Gestionnaire: move avis_dossier_path to avis_gestionnaire_dossier_path

This commit is contained in:
simon lehericey 2018-02-21 13:42:11 +01:00
parent 87a4029f1a
commit 63163e5022
5 changed files with 7 additions and 7 deletions

View file

@ -160,7 +160,7 @@ module NewGestionnaire
def create_avis def create_avis
Avis.create(avis_params.merge(claimant: current_gestionnaire, dossier: dossier)) Avis.create(avis_params.merge(claimant: current_gestionnaire, dossier: dossier))
redirect_to avis_dossier_path(procedure, dossier) redirect_to avis_gestionnaire_dossier_path(procedure, dossier)
end end
def update_annotations def update_annotations

View file

@ -27,10 +27,10 @@
- if notifications_summary[:annotations_privees] - if notifications_summary[:annotations_privees]
%span.notifications{ 'aria-label': 'notifications' } %span.notifications{ 'aria-label': 'notifications' }
= link_to "Annotations privées", annotations_privees_gestionnaire_dossier_path(dossier.procedure, dossier) = link_to "Annotations privées", annotations_privees_gestionnaire_dossier_path(dossier.procedure, dossier)
%li{ class: current_page?(avis_dossier_path(dossier.procedure, dossier)) ? 'active' : nil } %li{ class: current_page?(avis_gestionnaire_dossier_path(dossier.procedure, dossier)) ? 'active' : nil }
- if notifications_summary[:avis] - if notifications_summary[:avis]
%span.notifications{ 'aria-label': 'notifications' } %span.notifications{ 'aria-label': 'notifications' }
= link_to "Avis externes", avis_dossier_path(dossier.procedure, dossier) = link_to "Avis externes", avis_gestionnaire_dossier_path(dossier.procedure, dossier)
%li{ class: current_page?(messagerie_gestionnaire_dossier_path(dossier.procedure, dossier)) ? 'active' : nil } %li{ class: current_page?(messagerie_gestionnaire_dossier_path(dossier.procedure, dossier)) ? 'active' : nil }
- if notifications_summary[:messagerie] - if notifications_summary[:messagerie]
%span.notifications{ 'aria-label': 'notifications' } %span.notifications{ 'aria-label': 'notifications' }

View file

@ -3,6 +3,6 @@
= render partial: "header", locals: { dossier: @dossier } = render partial: "header", locals: { dossier: @dossier }
.container .container
= render partial: "new_gestionnaire/shared/avis/form", locals: { url: avis_dossier_path(@dossier.procedure, @dossier), must_be_confidentiel: false } = render partial: "new_gestionnaire/shared/avis/form", locals: { url: avis_gestionnaire_dossier_path(@dossier.procedure, @dossier), must_be_confidentiel: false }
= render partial: 'new_gestionnaire/shared/avis/list', locals: { avis: @dossier.avis, avis_seen_at: @avis_seen_at } = render partial: 'new_gestionnaire/shared/avis/list', locals: { avis: @dossier.avis, avis_seen_at: @avis_seen_at }

View file

@ -350,7 +350,7 @@ describe NewGestionnaire::DossiersController, type: :controller do
it { expect(saved_avis.confidentiel).to eq(true) } it { expect(saved_avis.confidentiel).to eq(true) }
it { expect(saved_avis.dossier).to eq(dossier) } it { expect(saved_avis.dossier).to eq(dossier) }
it { expect(saved_avis.claimant).to eq(gestionnaire) } it { expect(saved_avis.claimant).to eq(gestionnaire) }
it { expect(response).to redirect_to(avis_dossier_path(dossier.procedure, dossier)) } it { expect(response).to redirect_to(avis_gestionnaire_dossier_path(dossier.procedure, dossier)) }
end end
describe "#update_annotations" do describe "#update_annotations" do

View file

@ -63,7 +63,7 @@ feature 'The gestionnaire part' do
click_on dossier.user.email click_on dossier.user.email
click_on 'Avis externes' click_on 'Avis externes'
expect(page).to have_current_path(avis_dossier_path(procedure, dossier)) expect(page).to have_current_path(avis_gestionnaire_dossier_path(procedure, dossier))
expert_email = 'expert@tps.com' expert_email = 'expert@tps.com'
ask_confidential_avis(expert_email, 'a good introduction') ask_confidential_avis(expert_email, 'a good introduction')
@ -115,7 +115,7 @@ feature 'The gestionnaire part' do
click_on dossier.user.email click_on dossier.user.email
click_on 'Avis externes' click_on 'Avis externes'
expect(page).to have_current_path(avis_dossier_path(procedure, dossier)) expect(page).to have_current_path(avis_gestionnaire_dossier_path(procedure, dossier))
expert_email = 'expert@tps.com' expert_email = 'expert@tps.com'
ask_confidential_avis(expert_email, 'a good introduction') ask_confidential_avis(expert_email, 'a good introduction')