Skip to content

Commit

Permalink
✅ Fix cookie unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
skerit committed Oct 17, 2023
1 parent 8a6824e commit 3e16f90
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/25-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ describe('Controller', function() {
throw new Error('Response is missing the `set-cookie` header');
}

assert.deepStrictEqual(res.headers['set-cookie'].indexOf('my_cookie=some_value; path=/') > -1, true);
assert.deepStrictEqual(res.headers['set-cookie'].indexOf('my_cookie=some_value; path=/; domain=localhost') > -1, true);
assert.strictEqual(body, '');
next();
});
Expand All @@ -127,7 +127,7 @@ describe('Controller', function() {
return next(err);
}

assert.deepStrictEqual(res.headers['set-cookie'].indexOf('my_cookie=some_value; path=/') > -1, true);
assert.deepStrictEqual(res.headers['set-cookie'].indexOf('my_cookie=some_value; path=/; domain=localhost') > -1, true);
assert.strictEqual(body, 'SENTVALUE');
next();
});
Expand All @@ -146,7 +146,7 @@ describe('Controller', function() {
return next(err);
}

assert.deepStrictEqual(res.headers['set-cookie'].indexOf('my_cookie=some_value; path=/') > -1, true);
assert.deepStrictEqual(res.headers['set-cookie'].indexOf('my_cookie=some_value; path=/; domain=localhost') > -1, true);
assert.strictEqual(body, 'whatever');
done();
});
Expand Down

0 comments on commit 3e16f90

Please sign in to comment.