Skip to content

Commit 01fe5e6

Browse files
author
Arian Stolwijk
committed
Merge pull request #2677 from DimitarChristoff/bug-opera-tests
better test of HttpOnly that does not rely on the browser supporting it
2 parents 2628cd5 + e52f5e8 commit 01fe5e6

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

Specs/Utilities/Cookie.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,14 @@ describe('Cookie', function(){
2929
});
3030

3131
it('should set HttpCookie flag correctly', function(){
32-
Cookie.write('http-key', 'value', {
33-
httpOnly: true
34-
});
35-
36-
expect(Cookie.read('http-key')).toBeNull();
32+
var instance = new Cookie('key', {
33+
httpOnly: true,
34+
document: {
35+
cookie: ''
36+
}
37+
}).write('value');
38+
39+
expect(instance.options.document.cookie.indexOf('HttpOnly')).not.toBe(-1);
3740
});
3841

3942
});

0 commit comments

Comments
 (0)