From 8722a10d63b73b11460abe03e4a69ca5471cf09f Mon Sep 17 00:00:00 2001 From: Lisa Durand Date: Thu, 22 Aug 2024 17:54:24 +0200 Subject: [PATCH] fix specs --- spec/controllers/instructeurs/dossiers_controller_spec.rb | 6 +----- spec/models/champ_spec.rb | 7 ------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/spec/controllers/instructeurs/dossiers_controller_spec.rb b/spec/controllers/instructeurs/dossiers_controller_spec.rb index a8ae359ab..34df40103 100644 --- a/spec/controllers/instructeurs/dossiers_controller_spec.rb +++ b/spec/controllers/instructeurs/dossiers_controller_spec.rb @@ -1214,10 +1214,6 @@ describe Instructeurs::DossiersController, type: :controller do expect(DeletedDossier.where(dossier_id: dossier.id).count).to eq(0) end - it 'does not discard the dossier' do - expect(dossier.reload.hidden_at).to eq(nil) - end - it 'fill hidden by reason' do expect(dossier.reload.hidden_by_reason).not_to eq(nil) expect(dossier.reload.hidden_by_reason).to eq("instructeur_request") @@ -1240,7 +1236,7 @@ describe Instructeurs::DossiersController, type: :controller do context 'with dossier in batch_operation' do let(:batch_operation) { create(:batch_operation, operation: :archiver, dossiers: [dossier], instructeur: instructeur) } - it { expect { subject }.not_to change { dossier.reload.hidden_at } } + it { expect { subject }.not_to change { dossier.reload.hidden_by_administration_at } } it { is_expected.to redirect_to(instructeur_dossier_path(dossier.procedure, dossier)) } it 'flashes message' do subject diff --git a/spec/models/champ_spec.rb b/spec/models/champ_spec.rb index 4ea63a544..151b3e5bd 100644 --- a/spec/models/champ_spec.rb +++ b/spec/models/champ_spec.rb @@ -60,13 +60,6 @@ describe Champ do describe "associations" do it { is_expected.to belong_to(:dossier) } - - context 'when the parent dossier is discarded' do - let(:discarded_dossier) { create(:dossier, :discarded) } - subject(:champ) { discarded_dossier.champs_public.first } - - it { expect(champ.reload.dossier).to eq discarded_dossier } - end end describe "normalization" do