procedure: select for_individual by default

This commit is contained in:
Pierre de La Morinerie 2019-07-10 18:47:19 +02:00
parent 9616df192d
commit 7ca3d5fce2
2 changed files with 3 additions and 1 deletions

View file

@ -62,7 +62,7 @@ class Admin::ProceduresController < AdminController
end
def new
@procedure ||= Procedure.new
@procedure ||= Procedure.new(for_individual: true)
@availability = Procedure::PATH_AVAILABLE
end

View file

@ -36,6 +36,8 @@ feature 'As an administrateur I wanna create a new procedure', js: true do
click_on 'from-scratch'
expect(page).to have_current_path(new_admin_procedure_path)
expect(find('#procedure_for_individual_true')).to be_checked
expect(find('#procedure_for_individual_false')).not_to be_checked
fill_in 'procedure_duree_conservation_dossiers_dans_ds', with: '3'
fill_in 'procedure_duree_conservation_dossiers_hors_ds', with: '6'
click_on 'save-procedure'