Commit 61b861cc authored by Rémy Coutable's avatar Rémy Coutable

Fix spec/workers/admin_emails_worker_spec.rb

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 7fd912ae
...@@ -30,7 +30,7 @@ describe AdminEmailsWorker do ...@@ -30,7 +30,7 @@ describe AdminEmailsWorker do
expect(ActionMailer::Base.deliveries.count).to be 2 expect(ActionMailer::Base.deliveries.count).to be 2
end end
end end
end end
context "sending emails to members of a project only" do context "sending emails to members of a project only" do
let(:recipient_id) { "project-#{project.id}" } let(:recipient_id) { "project-#{project.id}" }
...@@ -38,10 +38,10 @@ describe AdminEmailsWorker do ...@@ -38,10 +38,10 @@ describe AdminEmailsWorker do
it "sends email to subscribed users" do it "sends email to subscribed users" do
perform_enqueued_jobs do perform_enqueued_jobs do
described_class.new.perform(recipient_id, 'subject', 'body') described_class.new.perform(recipient_id, 'subject', 'body')
expect(ActionMailer::Base.deliveries.count).to be 2 expect(ActionMailer::Base.deliveries.count).to be 3
end end
end end
end end
context "sending emails to users directly" do context "sending emails to users directly" do
let(:recipient_id) { "all" } let(:recipient_id) { "all" }
...@@ -52,6 +52,6 @@ describe AdminEmailsWorker do ...@@ -52,6 +52,6 @@ describe AdminEmailsWorker do
expect(ActionMailer::Base.deliveries.count).to be 4 expect(ActionMailer::Base.deliveries.count).to be 4
end end
end end
end end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment