From 3b3849e4f34bc18fb8df3a5e359b332859ef5cb5 Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Wed, 21 Feb 2018 13:42:12 +0100 Subject: [PATCH] Gestionnaire: move messagerie_avis_path to messagerie_gestionnaire_avis_path --- app/controllers/new_gestionnaire/avis_controller.rb | 2 +- app/views/new_gestionnaire/avis/_header.html.haml | 4 ++-- spec/controllers/new_gestionnaire/avis_controller_spec.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/new_gestionnaire/avis_controller.rb b/app/controllers/new_gestionnaire/avis_controller.rb index a240178ae..169370cdc 100644 --- a/app/controllers/new_gestionnaire/avis_controller.rb +++ b/app/controllers/new_gestionnaire/avis_controller.rb @@ -46,7 +46,7 @@ module NewGestionnaire if @commentaire.save flash.notice = "Message envoyé" - redirect_to messagerie_avis_path(avis) + redirect_to messagerie_gestionnaire_avis_path(avis) else flash.alert = @commentaire.errors.full_messages render :messagerie diff --git a/app/views/new_gestionnaire/avis/_header.html.haml b/app/views/new_gestionnaire/avis/_header.html.haml index 05ae187b7..4186735f4 100644 --- a/app/views/new_gestionnaire/avis/_header.html.haml +++ b/app/views/new_gestionnaire/avis/_header.html.haml @@ -11,5 +11,5 @@ = link_to 'Avis', instruction_gestionnaire_avis_path(avis) - if avis.answer == nil %span.notifications{ 'aria-label': 'notifications' } - %li{ class: current_page?(messagerie_avis_path(avis)) ? 'active' : nil } - = link_to 'Messagerie', messagerie_avis_path(avis) + %li{ class: current_page?(messagerie_gestionnaire_avis_path(avis)) ? 'active' : nil } + = link_to 'Messagerie', messagerie_gestionnaire_avis_path(avis) diff --git a/spec/controllers/new_gestionnaire/avis_controller_spec.rb b/spec/controllers/new_gestionnaire/avis_controller_spec.rb index 5f5bf959d..e2e5ec3e4 100644 --- a/spec/controllers/new_gestionnaire/avis_controller_spec.rb +++ b/spec/controllers/new_gestionnaire/avis_controller_spec.rb @@ -76,7 +76,7 @@ describe NewGestionnaire::AvisController, type: :controller do it do subject - expect(response).to redirect_to(messagerie_avis_path(avis_without_answer)) + expect(response).to redirect_to(messagerie_gestionnaire_avis_path(avis_without_answer)) expect(dossier.commentaires.map(&:body)).to match(['commentaire body']) end