Only notify on dossier supression if dossier is en_construction
This commit is contained in:
parent
ab90f930e9
commit
46e75ac8ef
3 changed files with 15 additions and 5 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue