tests
This commit is contained in:
parent
96556ca4b3
commit
842cc11689
2 changed files with 22 additions and 0 deletions
|
@ -839,4 +839,25 @@ describe Instructeurs::DossiersController, type: :controller do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe '#restore' do
|
||||||
|
let(:instructeur) { create(:instructeur) }
|
||||||
|
let!(:gi_p1_1) { GroupeInstructeur.create(label: '1', procedure: procedure) }
|
||||||
|
let!(:procedure) { create(:procedure, :published, instructeurs: [instructeur]) }
|
||||||
|
let!(:dossier) { create(:dossier, state: 'accepte', procedure: procedure, groupe_instructeur: procedure.groupe_instructeurs.first, hidden_by_administration_at: 1.hour.ago) }
|
||||||
|
|
||||||
|
before do
|
||||||
|
sign_in(instructeur.user)
|
||||||
|
instructeur.groupe_instructeurs << gi_p1_1
|
||||||
|
patch :restore,
|
||||||
|
params: {
|
||||||
|
procedure_id: procedure.id,
|
||||||
|
dossier_id: dossier.id
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
it "puts hidden_by_administration_at to nil" do
|
||||||
|
expect(dossier.reload.hidden_by_administration_at).to eq(nil)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -8,6 +8,7 @@ describe 'instructeurs/procedures/_list.html.haml', type: :view do
|
||||||
dossiers_a_suivre_count_per_procedure: 2,
|
dossiers_a_suivre_count_per_procedure: 2,
|
||||||
dossiers_archived_count_per_procedure: 1,
|
dossiers_archived_count_per_procedure: 1,
|
||||||
dossiers_termines_count_per_procedure: 1,
|
dossiers_termines_count_per_procedure: 1,
|
||||||
|
dossiers_supprimes_recemment_count_per_procedure: 0,
|
||||||
dossiers_expirant_count_per_procedure: 0,
|
dossiers_expirant_count_per_procedure: 0,
|
||||||
followed_dossiers_count_per_procedure: 0,
|
followed_dossiers_count_per_procedure: 0,
|
||||||
procedure_ids_en_cours_with_notifications: [],
|
procedure_ids_en_cours_with_notifications: [],
|
||||||
|
|
Loading…
Reference in a new issue