aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorYehuda Katz <wycats@gmail.com>2009-10-26 17:32:42 -0700
committerYehuda Katz <wycats@gmail.com>2009-10-26 17:32:42 -0700
commite1786ee6ebee9fab10d6756be1eeacbbe6b65b48 (patch)
tree403392cf338502f200949f6c59dfcd4be30c1e79 /actionpack/test/controller
parentd7499f8ee8faa80d12dccae5baf5ab2acc79e77d (diff)
downloadrails-e1786ee6ebee9fab10d6756be1eeacbbe6b65b48.tar.gz
rails-e1786ee6ebee9fab10d6756be1eeacbbe6b65b48.tar.bz2
rails-e1786ee6ebee9fab10d6756be1eeacbbe6b65b48.zip
Fixes expires_now and cleans things up a bit
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/render_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb
index 2db524ca4b..ac8dad7c42 100644
--- a/actionpack/test/controller/render_test.rb
+++ b/actionpack/test/controller/render_test.rb
@@ -73,6 +73,11 @@ class TestController < ActionController::Base
render :action => 'hello_world'
end
+ def conditional_hello_with_expires_now
+ expires_now
+ render :action => 'hello_world'
+ end
+
def conditional_hello_with_bangs
render :action => 'hello_world'
end
@@ -1321,6 +1326,11 @@ class ExpiresInRenderTest < ActionController::TestCase
get :conditional_hello_with_expires_in_with_public_with_more_keys_old_syntax
assert_equal "max-age=60, public, max-stale=18000", @response.headers["Cache-Control"]
end
+
+ def test_expires_now
+ get :conditional_hello_with_expires_now
+ assert_equal "no-cache", @response.headers["Cache-Control"]
+ end
end