diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index f4d805132..22a742584 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -233,13 +233,11 @@ describe User, type: :model do context 'avec un dossier en instruction' do let!(:dossier_en_instruction) { create(:dossier, :en_instruction, user: user) } it 'ne supprime rien si dossier en instruction' do - user.delete_and_keep_track_dossiers(administration) expect(Dossier.find_by(id: dossier_en_instruction.id)).to be_present expect(User.find_by(id: user.id)).to be_present end - end context 'sans dossier en instruction' do @@ -247,7 +245,6 @@ describe User, type: :model do let!(:dossier_brouillon) { create(:dossier, user: user) } it "garde une trace des dossiers et supprime l'utilisateur" do - user.delete_and_keep_track_dossiers(administration) expect(DeletedDossier.find_by(dossier_id: dossier_en_construction)).to be_present