diff options
Diffstat (limited to 'spec/lib/gitlab/email/attachment_uploader_spec.rb')
-rw-r--r-- | spec/lib/gitlab/email/attachment_uploader_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/lib/gitlab/email/attachment_uploader_spec.rb b/spec/lib/gitlab/email/attachment_uploader_spec.rb index 6beadb6e1a5..4b4e671f001 100644 --- a/spec/lib/gitlab/email/attachment_uploader_spec.rb +++ b/spec/lib/gitlab/email/attachment_uploader_spec.rb @@ -46,5 +46,15 @@ RSpec.describe Gitlab::Email::AttachmentUploader do expect(image_link[:url]).to include('gitlab_logo.png') end end + + context 'with a message with no content type' do + let(:message_raw) { fixture_file("emails/no_content_type.eml") } + + it 'uploads all attachments except the signature' do + links = described_class.new(message).execute(upload_parent: project, uploader_class: FileUploader) + + expect(links).to eq([]) + end + end end end |