diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-09-19 13:57:55 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-10-17 07:25:20 +0000 |
commit | 230bae9d48505ac59bfdc61ae739192416d18e92 (patch) | |
tree | 3bedd85a63c176f57c6d60c41b63f15993b2480a /spec/workers | |
parent | 572585665f838584b9547831528f26fb60df8d0f (diff) | |
download | gitlab-ce-230bae9d48505ac59bfdc61ae739192416d18e92.tar.gz |
Update the other sites for reset_delivered_emails! as well
Diffstat (limited to 'spec/workers')
-rw-r--r-- | spec/workers/build_email_worker_spec.rb | 2 | ||||
-rw-r--r-- | spec/workers/emails_on_push_worker_spec.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/spec/workers/build_email_worker_spec.rb b/spec/workers/build_email_worker_spec.rb index 788b92c1b84..a1aa336361a 100644 --- a/spec/workers/build_email_worker_spec.rb +++ b/spec/workers/build_email_worker_spec.rb @@ -24,7 +24,7 @@ describe BuildEmailWorker do end it "gracefully handles an input SMTP error" do - ActionMailer::Base.deliveries.clear + reset_delivered_emails! allow(Notify).to receive(:build_success_email).and_raise(Net::SMTPFatalError) subject.perform(build.id, [user.email], data.stringify_keys) diff --git a/spec/workers/emails_on_push_worker_spec.rb b/spec/workers/emails_on_push_worker_spec.rb index 036d037f3f9..fc652f6f4c3 100644 --- a/spec/workers/emails_on_push_worker_spec.rb +++ b/spec/workers/emails_on_push_worker_spec.rb @@ -87,7 +87,7 @@ describe EmailsOnPushWorker do context "when there is an SMTP error" do before do - ActionMailer::Base.deliveries.clear + reset_delivered_emails! allow(Notify).to receive(:repository_push_email).and_raise(Net::SMTPFatalError) allow(subject).to receive_message_chain(:logger, :info) perform @@ -112,7 +112,7 @@ describe EmailsOnPushWorker do original.call(Mail.new(mail.encoded)) end - ActionMailer::Base.deliveries.clear + reset_delivered_emails! end it "sends the mail to each of the recipients" do |