Fix discarded dossiers destruction

This commit is contained in:
Paul Chavard 2021-04-13 19:24:02 +01:00
parent 6e32117497
commit 5b56ec425b
2 changed files with 15 additions and 0 deletions

View file

@ -1422,4 +1422,16 @@ describe Dossier do
it { expect(dossier.api_entreprise_job_exceptions).to eq(['#<StandardError: My special exception!>']) }
end
end
describe "#destroy" do
let(:dossier) { create(:dossier) }
before do
create(:attestation, dossier: dossier)
create(:attestation, dossier: dossier)
end
it "can destroy dossier with two attestations" do
expect(dossier.destroy).to be_truthy
end
end
end