diff options
author | Go MAEDA <maeda@farend.jp> | 2019-04-30 01:37:25 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-04-30 01:37:25 +0000 |
commit | 6732ce9a93fcbd941d26579f6004e038544d5707 (patch) | |
tree | e68dada840367dd7ed58f8db0e337d58f5c82b8a /test/functional/attachments_controller_test.rb | |
parent | bb0918fd1427d4fa0c657930a352a0d2e8c10268 (diff) | |
download | redmine-6732ce9a93fcbd941d26579f6004e038544d5707.tar.gz redmine-6732ce9a93fcbd941d26579f6004e038544d5707.zip |
Fix that Content-Type header field is empty when sending a file of unknown type (#31275).
Patch by Go MAEDA.
git-svn-id: http://svn.redmine.org/redmine/trunk@18098 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/attachments_controller_test.rb')
-rw-r--r-- | test/functional/attachments_controller_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/functional/attachments_controller_test.rb b/test/functional/attachments_controller_test.rb index 4d6b23f26..8ef46013c 100644 --- a/test/functional/attachments_controller_test.rb +++ b/test/functional/attachments_controller_test.rb @@ -358,6 +358,16 @@ class AttachmentsControllerTest < Redmine::ControllerTest set_tmp_attachments_directory end + def test_download_should_assign_application_octet_stream_if_content_type_is_not_determined + get :download, :params => { + :id => 23 + } + assert_response :success + assert_nil Redmine::MimeType.of(attachments(:attachments_023).filename) + assert_equal 'application/octet-stream', @response.content_type + set_tmp_attachments_directory + end + def test_download_missing_file get :download, :params => { :id => 2 |