From 87a4029f1a999799f43e68b9894dbf2eb0f5a1b9 Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Wed, 21 Feb 2018 13:42:11 +0100 Subject: [PATCH] Gestionnaire: move annotations_privees_dossier_path to annotations_privees_gestionnaire_dossier_path --- app/controllers/new_gestionnaire/dossiers_controller.rb | 2 +- app/views/new_gestionnaire/dossiers/_header.html.haml | 4 ++-- spec/controllers/new_gestionnaire/dossiers_controller_spec.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/new_gestionnaire/dossiers_controller.rb b/app/controllers/new_gestionnaire/dossiers_controller.rb index a8aeb5647..4760a23f6 100644 --- a/app/controllers/new_gestionnaire/dossiers_controller.rb +++ b/app/controllers/new_gestionnaire/dossiers_controller.rb @@ -167,7 +167,7 @@ module NewGestionnaire dossier = current_gestionnaire.dossiers.includes(champs_private: :type_de_champ).find(params[:dossier_id]) # FIXME: add attachements validation, cf. Champ#piece_justificative_file_errors dossier.update_attributes(champs_private_params) - redirect_to annotations_privees_dossier_path(procedure, dossier) + redirect_to annotations_privees_gestionnaire_dossier_path(procedure, dossier) end def print diff --git a/app/views/new_gestionnaire/dossiers/_header.html.haml b/app/views/new_gestionnaire/dossiers/_header.html.haml index 0008a0794..df48dae9e 100644 --- a/app/views/new_gestionnaire/dossiers/_header.html.haml +++ b/app/views/new_gestionnaire/dossiers/_header.html.haml @@ -23,10 +23,10 @@ - if notifications_summary[:demande] %span.notifications{ 'aria-label': 'notifications' } = link_to "Demande", dossier_path(dossier.procedure, dossier) - %li{ class: current_page?(annotations_privees_dossier_path(dossier.procedure, dossier)) ? 'active' : nil } + %li{ class: current_page?(annotations_privees_gestionnaire_dossier_path(dossier.procedure, dossier)) ? 'active' : nil } - if notifications_summary[:annotations_privees] %span.notifications{ 'aria-label': 'notifications' } - = link_to "Annotations privées", annotations_privees_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 } - if notifications_summary[:avis] %span.notifications{ 'aria-label': 'notifications' } diff --git a/spec/controllers/new_gestionnaire/dossiers_controller_spec.rb b/spec/controllers/new_gestionnaire/dossiers_controller_spec.rb index 4411fbdff..dfe7ef057 100644 --- a/spec/controllers/new_gestionnaire/dossiers_controller_spec.rb +++ b/spec/controllers/new_gestionnaire/dossiers_controller_spec.rb @@ -394,6 +394,6 @@ describe NewGestionnaire::DossiersController, type: :controller do it { expect(champ_multiple_drop_down_list.value).to eq('["un", "deux"]') } it { expect(champ_datetime.value).to eq('21/12/2019 13:17') } - it { expect(response).to redirect_to(annotations_privees_dossier_path(dossier.procedure, dossier)) } + it { expect(response).to redirect_to(annotations_privees_gestionnaire_dossier_path(dossier.procedure, dossier)) } end end