diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-25 23:30:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-25 23:30:46 +0300 |
commit | 1d287b31040662f1cc53a61b866ea97931a6b850 (patch) | |
tree | 64c1ff71f40695c1d516a7b24cabf06c408685f1 /spec/lib/gitlab/email | |
parent | fdcb3d47df0526a9dc437c847683df8aae1e5d58 (diff) |
Add latest changes from gitlab-org/gitlab@13-12-stable-ee
Diffstat (limited to 'spec/lib/gitlab/email')
-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 |