9 describe('Cookie', function(){
11 it("should set a cookie", function(){
13 Cookie.write('test', 1);
17 it('should read and write a cookie', function(){
22 Cookie.write('key', 'value', options);
24 expect(Cookie.read('key', options)).to.equal('value');
26 Cookie.dispose('key', options);
28 expect(Cookie.read('key', options)).to.equal(null);
31 it('should set HttpCookie flag correctly', function(){
32 var instance = new Cookie('key', {
39 expect(instance.options.document.cookie.indexOf('HttpOnly')).to.not.equal(-1);