diff options
author | Prathamesh Sonpatki <csonpatki@gmail.com> | 2016-02-24 23:16:43 +0530 |
---|---|---|
committer | Prathamesh Sonpatki <csonpatki@gmail.com> | 2016-02-24 23:16:43 +0530 |
commit | 641bb39bb22be004f4c36dce34dfbdfdb3a4bc77 (patch) | |
tree | 903bc6a89ccc3c2536a72197214628a50757c790 /actionpack | |
parent | edbab4e4f558b1593d55b65022cfe7f7d34d49cd (diff) | |
download | rails-641bb39bb22be004f4c36dce34dfbdfdb3a4bc77.tar.gz rails-641bb39bb22be004f4c36dce34dfbdfdb3a4bc77.tar.bz2 rails-641bb39bb22be004f4c36dce34dfbdfdb3a4bc77.zip |
Added a test for generating Strong ETag
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/dispatch/response_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/response_test.rb b/actionpack/test/dispatch/response_test.rb index 8b3849cb7a..cd385982d9 100644 --- a/actionpack/test/dispatch/response_test.rb +++ b/actionpack/test/dispatch/response_test.rb @@ -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 |