mailers: mention the auto_archive in notify_new_draft

This commit is contained in:
Judith 2020-05-20 16:50:48 +02:00 committed by GitHub Action
parent e73086ee4c
commit 59346ee868
3 changed files with 10 additions and 1 deletions

View file

@ -12,7 +12,7 @@ RSpec.describe DossierMailer, type: :mailer do
end
describe '.notify_new_draft' do
let(:dossier) { create(:dossier, procedure: build(:simple_procedure)) }
let(:dossier) { create(:dossier, procedure: build(:simple_procedure, :with_auto_archive)) }
subject { described_class.notify_new_draft(dossier) }
@ -20,6 +20,7 @@ RSpec.describe DossierMailer, type: :mailer do
it { expect(subject.subject).to include(dossier.procedure.libelle) }
it { expect(subject.body).to include(dossier.procedure.libelle) }
it { expect(subject.body).to include(dossier_url(dossier)) }
it { expect(subject.body).to include("Vous pouvez déposer votre dossier jusqu'au") }
it_behaves_like 'a dossier notification'
end