summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-25 20:30:46 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-25 20:30:46 +0000
commit1d287b31040662f1cc53a61b866ea97931a6b850 (patch)
tree64c1ff71f40695c1d516a7b24cabf06c408685f1 /spec/lib/gitlab
parentfdcb3d47df0526a9dc437c847683df8aae1e5d58 (diff)
downloadgitlab-ce-1d287b31040662f1cc53a61b866ea97931a6b850.tar.gz
Add latest changes from gitlab-org/gitlab@13-12-stable-ee
Diffstat (limited to 'spec/lib/gitlab')
-rw-r--r--spec/lib/gitlab/email/attachment_uploader_spec.rb10
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