From 32ad152347104d432b6b994b22ad760552a8b5fb Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Wed, 22 Apr 2020 15:53:54 +0200 Subject: [PATCH] specs: ensure that discarded procedures are not shown --- .../instructeurs/procedures_controller_spec.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/controllers/instructeurs/procedures_controller_spec.rb b/spec/controllers/instructeurs/procedures_controller_spec.rb index 558312500..9b91ed178 100644 --- a/spec/controllers/instructeurs/procedures_controller_spec.rb +++ b/spec/controllers/instructeurs/procedures_controller_spec.rb @@ -236,6 +236,14 @@ describe Instructeurs::ProceduresController, type: :controller do instructeur.groupe_instructeurs << gi_2 end + context 'when the procedure is discarded' do + before do + procedure.discard! + end + + it { expect { subject }.to raise_error(ActiveRecord::RecordNotFound) } + end + context "without any dossier" do before { subject }