mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add regression tests
This commit is contained in:
parent
a960fc7032
commit
bed91f8421
1 changed files with 14 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue