diff options
Diffstat (limited to 'actionpack/test/controller/send_file_test.rb')
-rw-r--r-- | actionpack/test/controller/send_file_test.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/actionpack/test/controller/send_file_test.rb b/actionpack/test/controller/send_file_test.rb index 0bc0eb2df6..4134da3b9e 100644 --- a/actionpack/test/controller/send_file_test.rb +++ b/actionpack/test/controller/send_file_test.rb @@ -91,10 +91,10 @@ class SendFileTest < ActionController::TestCase def test_headers_after_send_shouldnt_include_charset response = process('data') - assert_equal "application/octet-stream", response.content_type + assert_equal "application/octet-stream", response.headers["Content-Type"] response = process('file') - assert_equal "application/octet-stream", response.content_type + assert_equal "application/octet-stream", response.headers["Content-Type"] end # Test that send_file_headers! is setting the correct HTTP headers. @@ -116,7 +116,7 @@ class SendFileTest < ActionController::TestCase h = @controller.headers assert_equal 1, h['Content-Length'] - assert_equal 'image/png', h['Content-Type'] + assert_equal 'image/png', @controller.content_type assert_equal 'disposition; filename="filename"', h['Content-Disposition'] assert_equal 'binary', h['Content-Transfer-Encoding'] @@ -136,9 +136,7 @@ class SendFileTest < ActionController::TestCase @controller.headers = {} @controller.send(:send_file_headers!, options) - headers = @controller.headers - - assert_equal 'image/png', headers['Content-Type'] + assert_equal 'image/png', @controller.content_type end |