diff --git a/spec/jobs/notify_new_answer_with_delay_job_spec.rb b/spec/jobs/notify_new_answer_with_delay_job_spec.rb index 4a7061d59..1a87ab841 100644 --- a/spec/jobs/notify_new_answer_with_delay_job_spec.rb +++ b/spec/jobs/notify_new_answer_with_delay_job_spec.rb @@ -6,7 +6,7 @@ describe NotifyNewAnswerWithDelayJob, type: :job do let(:commentaire) { create(:commentaire) } it 'call DossierMailer.notify_new_answer' do - expect(DossierMailer).to receive(:notify_new_answer).with(dossier, body) + expect(DossierMailer).to receive(:notify_new_answer).with(dossier, body).and_return(double(deliver_now: true)) NotifyNewAnswerWithDelayJob.perform_now(dossier, body, commentaire) end end