tests
This commit is contained in:
parent
eda5f75ec3
commit
4bfcf4f9d9
1 changed files with 14 additions and 0 deletions
|
@ -457,6 +457,20 @@ describe Instructeurs::DossiersController, type: :controller do
|
||||||
expect(flash.notice).to be_present
|
expect(flash.notice).to be_present
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context "when the dossier is deleted by user" do
|
||||||
|
let(:dossier) { create(:dossier, :accepte, procedure: procedure) }
|
||||||
|
|
||||||
|
before do
|
||||||
|
dossier.update!(hidden_by_user_at: 1.hour.ago)
|
||||||
|
subject
|
||||||
|
end
|
||||||
|
|
||||||
|
it "does not create a commentaire" do
|
||||||
|
expect { subject }.to change(Commentaire, :count).by(0)
|
||||||
|
expect(flash.alert).to be_present
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "#create_avis" do
|
describe "#create_avis" do
|
||||||
|
|
Loading…
Reference in a new issue