aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorarvida <arvid@winstondesign.se>2011-10-31 10:24:03 +0100
committerarvida <arvid@winstondesign.se>2011-10-31 10:24:03 +0100
commitbb4a79370a0091b7966de7f04f41e0b021adb29e (patch)
tree0c8be20fc29f86d3ceddea2aa80774f084452f33 /actionpack
parent818bf1da0e86cf50b5a33ec493959374ccc1cb7d (diff)
downloadrails-bb4a79370a0091b7966de7f04f41e0b021adb29e.tar.gz
rails-bb4a79370a0091b7966de7f04f41e0b021adb29e.tar.bz2
rails-bb4a79370a0091b7966de7f04f41e0b021adb29e.zip
Added test for setting of HTTP Date header when calling #expires_in
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/test/controller/render_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb
index aea603b014..4ec72ece32 100644
--- a/actionpack/test/controller/render_test.rb
+++ b/actionpack/test/controller/render_test.rb
@@ -1401,6 +1401,13 @@ class ExpiresInRenderTest < ActionController::TestCase
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