feat(instructeurs/procedure/dossiers#extend_conservation): add extends duree conservation in action button list, also rewire this action for user [extend by procedure.duree_conservation_dans_ds by default] but force 1.month for instructeur. add new icon for standby based on https://en.wikipedia.org/wiki/Power_symbol
This commit is contained in:
parent
d8a8d1fdab
commit
081d5094a9
21 changed files with 106 additions and 27 deletions
|
@ -804,4 +804,23 @@ describe Instructeurs::DossiersController, type: :controller do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe '#extend_conservation' do
|
||||
subject { post :extend_conservation, params: { procedure_id: procedure.id, dossier_id: dossier.id } }
|
||||
context 'when user logged in' do
|
||||
it 'works' do
|
||||
expect(subject).to redirect_to(instructeur_dossier_path(procedure, dossier))
|
||||
end
|
||||
|
||||
it 'extends conservation_extension by 1 month' do
|
||||
subject
|
||||
expect(dossier.reload.conservation_extension).to eq(1.month)
|
||||
end
|
||||
|
||||
it 'flashed notice success' do
|
||||
subject
|
||||
expect(flash[:notice]).to eq(I18n.t('views.instructeurs.dossiers.archived_dossier'))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue