Skip to content

Commit b6934d0

Browse files
committed
spec/cookie_spec: bump timestamp in test
1 parent 54606a9 commit b6934d0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spec/cookie_spec.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ describe("cookie module", function()
2626
it(":get works", function()
2727
local s = http_cookie.new_store()
2828
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")
3030
assert(s:store("mysite.com", "/", true, true, nil, key, value, params))
3131
assert.same("en-US", s:get("mysite.com", "/", "lang"))
3232
assert.same(nil, s:get("other.com", "/", "lang"))
@@ -68,7 +68,7 @@ describe("cookie module", function()
6868
s.time = function() return 1234567890 end -- set time to something before the expiry
6969
-- in spec this is kept from previous example.
7070
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")))
7272
assert.same("SID=31d4d96e407aad42; lang=en-US", s:lookup("example.com", "/", true, true))
7373
s.time = function() return 9234567890 end -- set time to something after the expiry
7474
assert.same("SID=31d4d96e407aad42", s:lookup("example.com", "/", true, true))
@@ -251,7 +251,7 @@ describe("cookie module", function()
251251
end)
252252
it("cleans up", function()
253253
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")))
255255
assert.same("foo", s:get("example.com", "/", "foo"))
256256
s.time = function() return 9876543210 end -- set time to something after the expiry
257257
s:clean()

0 commit comments

Comments
 (0)