Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #8946 from reednj77/rack-cache-headers
Account for ignored cookie set by turbolinks
  • Loading branch information
dhh committed Jan 15, 2013
2 parents d040b3d + dcb05f2 commit 390ad45
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions railties/test/application/middleware/cache_test.rb
Expand Up @@ -81,8 +81,8 @@ def test_cache_works_with_expires
add_to_config "config.action_dispatch.rack_cache = true"

get "/expires/expires_header"
assert_equal "miss, store", last_response.headers["X-Rack-Cache"]
assert_equal "max-age=10, public", last_response.headers["Cache-Control"]
assert_equal "miss, ignore, store", last_response.headers["X-Rack-Cache"]
assert_equal "max-age=10, public", last_response.headers["Cache-Control"]

body = last_response.body

Expand Down Expand Up @@ -115,8 +115,8 @@ def test_cache_works_with_etags
add_to_config "config.action_dispatch.rack_cache = true"

get "/expires/expires_etag"
assert_equal "miss, store", last_response.headers["X-Rack-Cache"]
assert_equal "public", last_response.headers["Cache-Control"]
assert_equal "miss, ignore, store", last_response.headers["X-Rack-Cache"]
assert_equal "public", last_response.headers["Cache-Control"]

body = last_response.body
etag = last_response.headers["ETag"]
Expand Down Expand Up @@ -149,8 +149,8 @@ def test_cache_works_with_last_modified
add_to_config "config.action_dispatch.rack_cache = true"

get "/expires/expires_last_modified"
assert_equal "miss, store", last_response.headers["X-Rack-Cache"]
assert_equal "public", last_response.headers["Cache-Control"]
assert_equal "miss, ignore, store", last_response.headers["X-Rack-Cache"]
assert_equal "public", last_response.headers["Cache-Control"]

body = last_response.body
last = last_response.headers["Last-Modified"]
Expand Down

0 comments on commit 390ad45

Please sign in to comment.