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:
parent
edbab4e4f5
commit
641bb39bb2
1 changed files with 8 additions and 0 deletions
|
@ -445,4 +445,12 @@ class ResponseIntegrationTest < ActionDispatch::IntegrationTest
|
|||
|
||||
assert_equal('application/xml; charset=utf-16', @response.headers['Content-Type'])
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue