diff options
Diffstat (limited to 'test/integration/attachments_test.rb')
-rw-r--r-- | test/integration/attachments_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/integration/attachments_test.rb b/test/integration/attachments_test.rb index 646382a42..bb3de7548 100644 --- a/test/integration/attachments_test.rb +++ b/test/integration/attachments_test.rb @@ -33,6 +33,16 @@ class AttachmentsTest < Redmine::IntegrationTest assert_equal 'text/plain', attachment.content_type end + def test_upload_should_accept_content_type_param + log_user('jsmith', 'jsmith') + assert_difference 'Attachment.count' do + post "/uploads.js?attachment_id=1&filename=foo&content_type=image/jpeg", "File content", {"CONTENT_TYPE" => 'application/octet-stream'} + assert_response :success + end + attachment = Attachment.order(:id => :desc).first + assert_equal 'image/jpeg', attachment.content_type + end + def test_upload_as_js_and_attach_to_an_issue log_user('jsmith', 'jsmith') |