mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #23862 from prathamesh-sonpatki/test-for-strong-etag
Added a test for generating Strong ETag
This commit is contained in:
commit
8db771bb69
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'])
|
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
|
||||||
|
|
Loading…
Reference in a new issue