Browse files

Fix new year heisenbug

  • Loading branch information...
1 parent 9790f0e commit db49b7dc94a744fd53eaf80107995ca55f9415e8 @jeremy jeremy committed Dec 31, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 actionpack/test/controller/cookie_test.rb
View
4 actionpack/test/controller/cookie_test.rb
@@ -155,7 +155,7 @@ def test_cookies_persist_throughout_request
def test_permanent_cookie
get :set_permanent_cookie
assert_match /Jamie/, @response.headers["Set-Cookie"]
- assert_match %r(#{20.years.from_now.year}), @response.headers["Set-Cookie"]
+ assert_match %r(#{20.years.from_now.utc.year}), @response.headers["Set-Cookie"]
end
def test_signed_cookie
@@ -165,7 +165,7 @@ def test_signed_cookie
def test_permanent_signed_cookie
get :set_permanent_signed_cookie
- assert_match %r(#{20.years.from_now.year}), @response.headers["Set-Cookie"]
+ assert_match %r(#{20.years.from_now.utc.year}), @response.headers["Set-Cookie"]
assert_equal 100, @controller.send(:cookies).signed[:remember_me]
end

0 comments on commit db49b7d

Please sign in to comment.