@@ -26,7 +26,7 @@ describe("cookie module", function()
26
26
it (" :get works" , function ()
27
27
local s = http_cookie .new_store ()
28
28
assert .same (nil , s :get (" mysite.com" , " /" , " lang" ))
29
- local key , value , params = http_cookie .parse_setcookie (" lang=en-US; Expires=Wed, 09 Jun 2021 10:18:14 GMT" )
29
+ local key , value , params = http_cookie .parse_setcookie (" lang=en-US; Expires=Wed, 09 Jun 2121 10:18:14 GMT" )
30
30
assert (s :store (" mysite.com" , " /" , true , true , nil , key , value , params ))
31
31
assert .same (" en-US" , s :get (" mysite.com" , " /" , " lang" ))
32
32
assert .same (nil , s :get (" other.com" , " /" , " lang" ))
@@ -68,7 +68,7 @@ describe("cookie module", function()
68
68
s .time = function () return 1234567890 end -- set time to something before the expiry
69
69
-- in spec this is kept from previous example.
70
70
assert (s :store (" example.com" , " /" , true , true , nil , http_cookie .parse_setcookie (" SID=31d4d96e407aad42; Path=/; Secure; HttpOnly" )))
71
- assert (s :store (" example.com" , " /" , true , true , nil , http_cookie .parse_setcookie (" lang=en-US; Expires=Wed, 09 Jun 2021 10:18:14 GMT" )))
71
+ assert (s :store (" example.com" , " /" , true , true , nil , http_cookie .parse_setcookie (" lang=en-US; Expires=Wed, 09 Jun 2121 10:18:14 GMT" )))
72
72
assert .same (" SID=31d4d96e407aad42; lang=en-US" , s :lookup (" example.com" , " /" , true , true ))
73
73
s .time = function () return 9234567890 end -- set time to something after the expiry
74
74
assert .same (" SID=31d4d96e407aad42" , s :lookup (" example.com" , " /" , true , true ))
@@ -251,7 +251,7 @@ describe("cookie module", function()
251
251
end )
252
252
it (" cleans up" , function ()
253
253
local s = http_cookie .new_store ()
254
- assert .truthy (s :store (" example.com" , " /" , true , true , nil , http_cookie .parse_setcookie (" foo=foo; Expires=Wed, 09 Jun 2021 10:18:14 GMT" )))
254
+ assert .truthy (s :store (" example.com" , " /" , true , true , nil , http_cookie .parse_setcookie (" foo=foo; Expires=Wed, 09 Jun 2121 10:18:14 GMT" )))
255
255
assert .same (" foo" , s :get (" example.com" , " /" , " foo" ))
256
256
s .time = function () return 9876543210 end -- set time to something after the expiry
257
257
s :clean ()
0 commit comments