aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@plataformatec.com.br>2012-02-18 00:28:23 -0800
committerJosé Valim <jose.valim@plataformatec.com.br>2012-02-18 00:28:23 -0800
commit2f689d462d8e94365724c5575b14ab997e11bb43 (patch)
treef6c842c996c6526c8cefd828af724fe69401f94c /actionpack/test/controller
parent663c9f30c60d4082cbcb77db80d809ee512e06c2 (diff)
parent2a7230aa997b19971b39812893d79ca3f6c3bb47 (diff)
downloadrails-2f689d462d8e94365724c5575b14ab997e11bb43.tar.gz
rails-2f689d462d8e94365724c5575b14ab997e11bb43.tar.bz2
rails-2f689d462d8e94365724c5575b14ab997e11bb43.zip
Merge pull request #3479 from arvida/ensure-date-header-on-expires-in
Ensure Date header on expires_in
Diffstat (limited to 'actionpack/test/controller')
-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 c384d7c80d..e040878b26 100644
--- a/actionpack/test/controller/render_test.rb
+++ b/actionpack/test/controller/render_test.rb
@@ -1433,6 +1433,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