Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
Exelord committed Jun 20, 2019
1 parent d329815 commit c516386
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/unit/services/cookies-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,15 @@ describe('CookiesService', function() {
this.subject().write(COOKIE_NAME, 'test', { httpOnly: true });
}).to.not.throw();
});

it('sets the sameSite flag', function() {
this.fakeFastBoot.response.headers.append = function(headerName, headerValue) {
expect(headerName).to.equal('set-cookie');
expect(headerValue).to.equal(`${COOKIE_NAME}=test; SameSite=Strict`);
};

this.subject().write(COOKIE_NAME, 'test', { sameSite: 'Strict' });
});
});

describe('clearing a cookie', function() {
Expand Down

0 comments on commit c516386

Please sign in to comment.