aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorGodfrey Chan <godfreykfc@gmail.com>2016-01-20 14:27:52 -0800
committerGodfrey Chan <godfreykfc@gmail.com>2016-01-20 14:27:52 -0800
commit24e39ffb53bc3daa47a0aee8c37734d8ae39b824 (patch)
tree64c735bee3ede51ab398d673a78ae66177c69027 /actionpack/test/controller
parent3bc6a6c123985eae2c902eb66bf396ed6f5fb27c (diff)
parente362c31b342927361f3e81f36d12e245bca624c2 (diff)
downloadrails-24e39ffb53bc3daa47a0aee8c37734d8ae39b824.tar.gz
rails-24e39ffb53bc3daa47a0aee8c37734d8ae39b824.tar.bz2
rails-24e39ffb53bc3daa47a0aee8c37734d8ae39b824.zip
Merge pull request #17573 from zerothabhishek/master
Response etags to always be weak: Prefixed 'W/' to value returned by Act...
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/live_stream_test.rb2
-rw-r--r--actionpack/test/controller/render_test.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/test/controller/live_stream_test.rb b/actionpack/test/controller/live_stream_test.rb
index aab2d9545d..2ef9734269 100644
--- a/actionpack/test/controller/live_stream_test.rb
+++ b/actionpack/test/controller/live_stream_test.rb
@@ -429,7 +429,7 @@ module ActionController
end
def test_stale_with_etag
- @request.if_none_match = Digest::MD5.hexdigest("123")
+ @request.if_none_match = %(W/"#{Digest::MD5.hexdigest('123')}")
get :with_stale
assert_equal 304, response.status.to_i
end
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb
index 256ebf6a07..990e5813a8 100644
--- a/actionpack/test/controller/render_test.rb
+++ b/actionpack/test/controller/render_test.rb
@@ -461,7 +461,7 @@ class EtagRenderTest < ActionController::TestCase
end
def etag(record)
- Digest::MD5.hexdigest(ActiveSupport::Cache.expand_cache_key(record)).inspect
+ %(W/"#{Digest::MD5.hexdigest(ActiveSupport::Cache.expand_cache_key(record))}")
end
end