Permalink
Browse files

Added test for setting of HTTP Date header when calling #expires_in

  • Loading branch information...
1 parent 818bf1d commit bb4a79370a0091b7966de7f04f41e0b021adb29e arvida committed Oct 31, 2011
Showing with 7 additions and 0 deletions.
  1. +7 −0 actionpack/test/controller/render_test.rb
@@ -1401,6 +1401,13 @@ def test_expires_now
get :conditional_hello_with_expires_now
assert_equal "no-cache", @response.headers["Cache-Control"]
end
+
+ def test_date_header_when_expires_in
+ time = Time.mktime(2011,10,30)
+ Time.stubs(:now).returns(time)
+ get :conditional_hello_with_expires_in
+ assert_equal Time.now.httpdate, @response.headers["Date"]
+ end
end
class LastModifiedRenderTest < ActionController::TestCase

0 comments on commit bb4a793

Please sign in to comment.