Only notify on dossier supression if dossier is en_construction

This commit is contained in:
Paul Chavard 2018-08-02 16:36:50 +02:00
parent ab90f930e9
commit 46e75ac8ef
3 changed files with 15 additions and 5 deletions

View file

@ -498,7 +498,7 @@ describe NewUser::DossiersController, type: :controller do
end
context 'when dossier is owned by signed in user' do
let(:dossier) { create(:dossier, user: user, autorisation_donnees: true) }
let(:dossier) { create(:dossier, :en_construction, user: user, autorisation_donnees: true) }
it do
expect(DossierMailer).to receive(:notify_deletion_to_administration).with(kind_of(DeletedDossier), dossier.procedure.administrateur.email).and_return(double(deliver_later: nil))