Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-10-29 15:14:45 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-10-29 15:14:45 +0300
commit27f6da0ab2b8f1945a78709c7b5d540a6cc400fd (patch)
tree1a9d2e332984f457e359f4bed051596e96ee6088 /spec/workers/email_receiver_worker_spec.rb
parenta056c4d05f51985f2228dcb66d302279855e9b3c (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/workers/email_receiver_worker_spec.rb')
-rw-r--r--spec/workers/email_receiver_worker_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/workers/email_receiver_worker_spec.rb b/spec/workers/email_receiver_worker_spec.rb
index 83e13ded7b3..83720ee132b 100644
--- a/spec/workers/email_receiver_worker_spec.rb
+++ b/spec/workers/email_receiver_worker_spec.rb
@@ -37,6 +37,15 @@ RSpec.describe EmailReceiverWorker, :mailer do
expect(email.to).to eq(["jake@adventuretime.ooo"])
expect(email.subject).to include("Rejected")
end
+
+ it 'strips out the body before passing to EmailRejectionMailer' do
+ mail = Mail.new(raw_message)
+ mail.body = nil
+
+ expect(EmailRejectionMailer).to receive(:rejection).with(anything, mail.encoded, anything).and_call_original
+
+ described_class.new.perform(raw_message)
+ end
end
context 'when the error is Gitlab::Email::AutoGeneratedEmailError' do