link procedure to administrateur
This commit is contained in:
parent
2696a6098e
commit
9942525984
2 changed files with 3 additions and 1 deletions
|
@ -45,6 +45,6 @@ class Admin::ProceduresController < AdminController
|
|||
private
|
||||
|
||||
def create_procedure_params
|
||||
params.require(:procedure).permit(:libelle, :description, :organisation, :direction, :lien_demarche, :use_api_carto)
|
||||
params.require(:procedure).permit(:libelle, :description, :organisation, :direction, :lien_demarche, :use_api_carto).merge(administrateur_id: current_administrateur.id)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -78,6 +78,8 @@ describe Admin::ProceduresController, type: :controller do
|
|||
it { expect(subject.direction).to eq(direction) }
|
||||
it { expect(subject.lien_demarche).to eq(lien_demarche) }
|
||||
it { expect(subject.use_api_carto).to be_truthy }
|
||||
it { expect(subject.administrateur_id).to eq(admin.id) }
|
||||
|
||||
end
|
||||
|
||||
it { expect(subject).to redirect_to(admin_procedures_path) }
|
||||
|
|
Loading…
Reference in a new issue