From 9f4379549f6e3f76e6ef12a63eca98b132f33994 Mon Sep 17 00:00:00 2001 From: Fagner Brack Date: Tue, 29 Jan 2013 12:22:53 -0200 Subject: [PATCH] write cookies using $.cookie since the read operation already tests it --- test/tests.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/tests.js b/test/tests.js index 33ea72b..f46a572 100644 --- a/test/tests.js +++ b/test/tests.js @@ -64,7 +64,7 @@ test('json = true', function () { $.cookie.json = true; if ('JSON' in window) { - document.cookie = 'c=' + JSON.stringify({ foo: 'bar' }); + $.cookie('c', { foo: 'bar' }); deepEqual($.cookie('c'), { foo: 'bar'}, 'should parse JSON'); } else { ok(true); @@ -202,7 +202,7 @@ module('removeCookie', lifecycle); test('deletion', function() { expect(1); - document.cookie = 'c=v'; + $.cookie('c', 'v'); $.removeCookie('c'); equal(document.cookie, '', 'should delete the cookie'); }); @@ -211,7 +211,7 @@ test('return', function() { expect(2); strictEqual($.removeCookie('c'), false, "return false if the cookie wasn't found"); - document.cookie = 'c=v'; + $.cookie('c', 'v'); strictEqual($.removeCookie('c'), true, 'return true if the cookie was found'); });