1
0
Fork 0
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:
Jon Moss 2016-08-29 17:35:15 -04:00
parent a960fc7032
commit bed91f8421

View file

@ -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