-
-
Notifications
You must be signed in to change notification settings - Fork 688
Closed
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Hi,
There is a issue with mocking header set-cookie and when i try mocking multiple set-cookie
Example: When i mock request
mockAgent.get(accountFrontHost).intercept({
path: '/user/login',
method: 'POST',
body: JSON.stringify(expectedPostUserLoginBody),
query: expectedPostUserLoginParams,
headers: {'Accept-Version': '1.0.0', 'Content-Type': 'application/json'}
}).reply(204, {},{
headers: {
'set-cookie': [
'aaaaaaaa=bbbbbbbbbbbbbbbbbb; Domain=.example.pl; Path=/; Expires=Fri, 07 Jul 2023 10:04:22 GMT; HttpOnly; Secure; SameSite=None',
'cccccccc=dddddddddddddddddd; Domain=.example.pl; Path=/; Expires=Fri, 07 Jul 2023 10:04:22 GMT; HttpOnly; Secure',
'eeeeeeeeeee=ffffffffffffffff; Domain=.example.pl; Path=/; Expires=Fri, 07 Jul 2023 10:04:22 GMT; HttpOnly; Secure; SameSite=None'
]
}});
Mock "flattens" the set-cookie and reply as string not as array of strings
statusCode: 204,
headers: {
'set-cookie': 'aaaaaaaa=bbbbbbbbbbbbbbbbbb; Domain=.example.pl; Path=/; Expires=Fri, 07 Jul 2023 10:04:22 GMT; HttpOnly; Secure; SameSite=None,cccccccc=dddddddddddddddddd; Domain=.example.pl; Path=/; Expires=Fri, 07 Jul 2023 10:04:22 GMT; HttpOnly; Secure,eeeeeeeeeee=ffffffffffffffff; Domain=.example.pl; Path=/; Expires=Fri, 07 Jul 2023 10:04:22 GMT; HttpOnly; Secure; SameSite=None'
},
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers