Gestionnaire: move procedures_path to gestionnaire_procedures_path

This commit is contained in:
simon lehericey 2018-02-21 15:06:21 +01:00
parent 4a70087f7a
commit 0308345008
6 changed files with 8 additions and 8 deletions

View file

@ -5,7 +5,7 @@ class RootController < ApplicationController
if administrateur_signed_in?
return redirect_to admin_procedures_path
elsif gestionnaire_signed_in?
return redirect_to procedures_path
return redirect_to gestionnaire_procedures_path
elsif user_signed_in?
return redirect_to users_dossiers_path
elsif administration_signed_in?

View file

@ -26,7 +26,7 @@ class Users::SessionsController < Sessions::SessionsController
if user_signed_in?
redirect_to after_sign_in_path_for(:user)
elsif gestionnaire_signed_in?
location = stored_location_for(:gestionnaire) || procedures_path
location = stored_location_for(:gestionnaire) || gestionnaire_procedures_path
redirect_to location
elsif administrateur_signed_in?
redirect_to admin_path

View file

@ -12,7 +12,7 @@
%ul.header-tabs
- if current_gestionnaire.procedures.count > 0
%li
= link_to "Procédures", procedures_path, class: (controller_name != 'avis') ? "tab-link active" : 'tab-link'
= link_to "Procédures", gestionnaire_procedures_path, class: (controller_name != 'avis') ? "tab-link active" : 'tab-link'
- if current_gestionnaire.avis.count > 0
%li
= link_to avis_index_path, class: (controller_name == 'avis') ? "tab-link active" : 'tab-link' do
@ -60,7 +60,7 @@
Passer en usager
- if gestionnaire_signed_in? && nav_bar_profile != :gestionnaire
%li
= link_to procedures_path, class: "menu-item menu-link" do
= link_to gestionnaire_procedures_path, class: "menu-item menu-link" do
= image_tag "icons/switch-profile.svg"
Passer en accompagnateur
- if administrateur_signed_in? && nav_bar_profile != :administrateur

View file

@ -12,7 +12,7 @@
Usager
- if gestionnaire_signed_in?
%li
= link_to(procedures_path) do
= link_to(gestionnaire_procedures_path) do
%i.fa.fa-user
&nbsp;
Accompagnateur

View file

@ -21,7 +21,7 @@ describe RootController, type: :controller do
sign_in gestionnaire
end
it { expect(subject).to redirect_to(procedures_path) }
it { expect(subject).to redirect_to(gestionnaire_procedures_path) }
end
context 'when Administrateur is connected' do

View file

@ -10,7 +10,7 @@ feature 'The gestionnaire part' do
scenario 'A gestionnaire can accept a dossier' do
log_in(gestionnaire.email, password)
expect(page).to have_current_path(procedures_path)
expect(page).to have_current_path(gestionnaire_procedures_path)
click_on procedure.libelle
expect(page).to have_current_path(gestionnaire_procedure_path(procedure))
@ -136,7 +136,7 @@ feature 'The gestionnaire part' do
fill_in 'user_email', with: email
fill_in 'user_password', with: password
click_on 'Se connecter'
expect(page).to have_current_path(procedures_path)
expect(page).to have_current_path(gestionnaire_procedures_path)
end
def log_out