add dist files builder and tester to Gruntfile
[mootools.git] / Specs / Utilities / Cookie.js
blob54a669adc1d24241c1d86117d21f48448ce42545
1 /*
2 ---
3 name: Cookie
4 requires: ~
5 provides: ~
6 ...
7 */
9 describe('Cookie', function(){
11         it("should set a cookie", function(){
13                 Cookie.write('test', 1);
15         });
17         it('should read and write a cookie', function(){
18                 var options = {
19                         duration: 1
20                 };
22                 Cookie.write('key', 'value', options);
24                 expect(Cookie.read('key', options)).toBe('value');
26                 Cookie.dispose('key', options);
28                 expect(Cookie.read('key', options)).toBeNull();
29         });
31 });