1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Added a test for generating Strong ETag

This commit is contained in:
Prathamesh Sonpatki 2016-02-24 23:16:43 +05:30
parent edbab4e4f5
commit 641bb39bb2

View file

@ -445,4 +445,12 @@ class ResponseIntegrationTest < ActionDispatch::IntegrationTest
assert_equal('application/xml; charset=utf-16', @response.headers['Content-Type']) assert_equal('application/xml; charset=utf-16', @response.headers['Content-Type'])
end end
test "we can set strong ETag by directly adding it as header" do
@response = ActionDispatch::Response.create
@response.add_header "ETag", '"202cb962ac59075b964b07152d234b70"'
assert_equal('"202cb962ac59075b964b07152d234b70"', @response.etag)
assert_equal('"202cb962ac59075b964b07152d234b70"', @response.headers['ETag'])
end
end end