Merge pull request #9569 from demarches-simplifiees/fix-email-service

fix: corrige l'envoi d'email aux admins avec service sans siret
This commit is contained in:
Paul Chavard 2023-10-09 08:34:31 +00:00 committed by GitHub
commit 2ed2125b2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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)