fix specs

This commit is contained in:
Lisa Durand 2024-08-22 17:54:24 +02:00
parent b586f23009
commit 8722a10d63
No known key found for this signature in database
GPG key ID: 0DF91F2CA1E8B816
2 changed files with 1 additions and 12 deletions

View file

@ -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

View file

@ -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