aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/render_test.rb
diff options
context:
space:
mode:
authorYuji Yaginuma <yuuji.yaginuma@gmail.com>2019-01-09 07:59:16 +0900
committerGitHub <noreply@github.com>2019-01-09 07:59:16 +0900
commitb03d493cf61f37abe7dc0539aee1985b6a9eea63 (patch)
tree8931b7a68ab5b788c55feaaf51d019c879b63e38 /actionpack/test/controller/render_test.rb
parentd79366b4c9619e70a2c292b3a7c0311618eba9be (diff)
parentc1dd2285799b19b7067119b2aa121ca922b75bc3 (diff)
downloadrails-b03d493cf61f37abe7dc0539aee1985b6a9eea63.tar.gz
rails-b03d493cf61f37abe7dc0539aee1985b6a9eea63.tar.bz2
rails-b03d493cf61f37abe7dc0539aee1985b6a9eea63.zip
Merge pull request #34885 from y-yagi/fixes_34780
Allow using combine the Cache-Control `public` and `no-cache` headers
Diffstat (limited to 'actionpack/test/controller/render_test.rb')
-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 306b245bd1..4750093c5c 100644
--- a/actionpack/test/controller/render_test.rb
+++ b/actionpack/test/controller/render_test.rb
@@ -183,6 +183,11 @@ class TestController < ActionController::Base
render action: "hello_world"
end
+ def conditional_hello_without_expires_and_public_header
+ response.headers["Cache-Control"] = "public, no-cache"
+ render action: "hello_world"
+ end
+
def conditional_hello_with_bangs
render action: "hello_world"
end
@@ -418,6 +423,11 @@ class ExpiresInRenderTest < ActionController::TestCase
assert_equal "no-cache", @response.headers["Cache-Control"]
end
+ def test_no_expires_now_with_public
+ get :conditional_hello_without_expires_and_public_header
+ assert_equal "public, no-cache", @response.headers["Cache-Control"]
+ end
+
def test_date_header_when_expires_in
time = Time.mktime(2011, 10, 30)
Time.stub :now, time do