fix: email no siret service

This commit is contained in:
Christophe Robillard 2023-10-06 11:16:12 +02:00
parent 4750e4a4bf
commit 75d671c0b4
2 changed files with 2 additions and 2 deletions

View file

@ -14,7 +14,7 @@ namespace :service do
progress = ProgressReport.new(admins.count)
admins.each do |admin|
AdministrateurMailer.notify_service_without_siret(admin.email).deliver
AdministrateurMailer.notify_service_without_siret(admin.email).deliver_later
progress.inc
end
end

View file

@ -36,7 +36,7 @@ describe 'service tasks' do
it 'emails admins with published procedures with services without siret' do
message = double("message")
allow(message).to receive(:deliver)
allow(message).to receive(:deliver_later)
allow(AdministrateurMailer).to receive(:notify_service_without_siret).with(administrateur.email).and_return(message)
allow(AdministrateurMailer).to receive(:notify_service_without_siret).with(administrateur_with_siret_service.email).and_return(message)