openly fail when not delivering mail
This commit is contained in:
parent
40a90ca4b7
commit
415cc2c2f1
3 changed files with 0 additions and 20 deletions
|
@ -3,16 +3,6 @@ RSpec.describe ApplicationMailer, type: :mailer do
|
|||
let(:dossier) { create(:dossier, procedure: build(:simple_procedure)) }
|
||||
subject { DossierMailer.notify_new_draft(dossier) }
|
||||
|
||||
describe 'invalid emails are not sent' do
|
||||
before do
|
||||
allow_any_instance_of(DossierMailer)
|
||||
.to receive(:notify_new_draft)
|
||||
.and_raise(Net::SMTPSyntaxError)
|
||||
end
|
||||
|
||||
it { expect(subject.message).to be_an_instance_of(ActionMailer::Base::NullMail) }
|
||||
end
|
||||
|
||||
describe 'valid emails are sent' do
|
||||
it { expect(subject.message).not_to be_an_instance_of(ActionMailer::Base::NullMail) }
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue