Merge pull request #3512 from tchak/create-new-procedures-with-administrateurs
Create new procedures with administrateurs
This commit is contained in:
commit
f6e8ffb582
3 changed files with 3 additions and 2 deletions
|
@ -67,7 +67,7 @@ class Admin::ProceduresController < AdminController
|
|||
end
|
||||
|
||||
def create
|
||||
@procedure = current_administrateur.admin_procedures.build(procedure_params)
|
||||
@procedure = Procedure.new(procedure_params.merge(administrateurs: [current_administrateur]))
|
||||
@path = @procedure.path
|
||||
@availability = Procedure.path_availability(current_administrateur, @procedure.path)
|
||||
|
||||
|
|
|
@ -13,6 +13,6 @@ namespace :after_party do
|
|||
end
|
||||
|
||||
progress.finish
|
||||
AfterParty::TaskRecord.create version: '20190214101524'
|
||||
AfterParty::TaskRecord.create version: '20190226101524'
|
||||
end
|
||||
end
|
|
@ -197,6 +197,7 @@ describe Admin::ProceduresController, type: :controller do
|
|||
it { expect(subject.organisation).to eq(organisation) }
|
||||
it { expect(subject.direction).to eq(direction) }
|
||||
it { expect(subject.administrateur_id).to eq(admin.id) }
|
||||
it { expect(subject.administrateurs).to eq([admin]) }
|
||||
it { expect(subject.duree_conservation_dossiers_dans_ds).to eq(duree_conservation_dossiers_dans_ds) }
|
||||
it { expect(subject.duree_conservation_dossiers_hors_ds).to eq(duree_conservation_dossiers_hors_ds) }
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue