diff options
author | Jon Moss <me@jonathanmoss.me> | 2016-08-29 17:35:15 -0400 |
---|---|---|
committer | Jon Moss <me@jonathanmoss.me> | 2016-08-29 17:54:02 -0400 |
commit | bed91f842109c715903ebbe3ce9754629b3594fd (patch) | |
tree | ae28a19330f9b0bcb588ff4851f0b883ff2f33c3 /actionpack | |
parent | a960fc703245df735787a3fcc05eb66701e150ba (diff) | |
download | rails-bed91f842109c715903ebbe3ce9754629b3594fd.tar.gz rails-bed91f842109c715903ebbe3ce9754629b3594fd.tar.bz2 rails-bed91f842109c715903ebbe3ce9754629b3594fd.zip |
Add regression tests
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/controller/send_file_test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/actionpack/test/controller/send_file_test.rb b/actionpack/test/controller/send_file_test.rb index 25420ead3b..8dc565ac8d 100644 --- a/actionpack/test/controller/send_file_test.rb +++ b/actionpack/test/controller/send_file_test.rb @@ -233,4 +233,18 @@ class SendFileTest < ActionController::TestCase response = process("file") assert_equal 200, response.status end + + def test_send_file_charset_with_type_options_key + @controller = SendFileWithActionControllerLive.new + @controller.options = { type: "text/calendar; charset=utf-8" } + response = process("file") + assert_equal "text/calendar; charset=utf-8", response.headers["Content-Type"] + end + + def test_send_file_charset_with_content_type_options_key + @controller = SendFileWithActionControllerLive.new + @controller.options = { content_type: "text/calendar" } + response = process("file") + assert_equal "text/calendar; charset=utf-8", response.headers["Content-Type"] + end end |