Gestionnaire: move procedures_path to gestionnaire_procedures_path
This commit is contained in:
parent
4a70087f7a
commit
0308345008
6 changed files with 8 additions and 8 deletions
|
@ -5,7 +5,7 @@ class RootController < ApplicationController
|
||||||
if administrateur_signed_in?
|
if administrateur_signed_in?
|
||||||
return redirect_to admin_procedures_path
|
return redirect_to admin_procedures_path
|
||||||
elsif gestionnaire_signed_in?
|
elsif gestionnaire_signed_in?
|
||||||
return redirect_to procedures_path
|
return redirect_to gestionnaire_procedures_path
|
||||||
elsif user_signed_in?
|
elsif user_signed_in?
|
||||||
return redirect_to users_dossiers_path
|
return redirect_to users_dossiers_path
|
||||||
elsif administration_signed_in?
|
elsif administration_signed_in?
|
||||||
|
|
|
@ -26,7 +26,7 @@ class Users::SessionsController < Sessions::SessionsController
|
||||||
if user_signed_in?
|
if user_signed_in?
|
||||||
redirect_to after_sign_in_path_for(:user)
|
redirect_to after_sign_in_path_for(:user)
|
||||||
elsif gestionnaire_signed_in?
|
elsif gestionnaire_signed_in?
|
||||||
location = stored_location_for(:gestionnaire) || procedures_path
|
location = stored_location_for(:gestionnaire) || gestionnaire_procedures_path
|
||||||
redirect_to location
|
redirect_to location
|
||||||
elsif administrateur_signed_in?
|
elsif administrateur_signed_in?
|
||||||
redirect_to admin_path
|
redirect_to admin_path
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
%ul.header-tabs
|
%ul.header-tabs
|
||||||
- if current_gestionnaire.procedures.count > 0
|
- if current_gestionnaire.procedures.count > 0
|
||||||
%li
|
%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
|
- if current_gestionnaire.avis.count > 0
|
||||||
%li
|
%li
|
||||||
= link_to avis_index_path, class: (controller_name == 'avis') ? "tab-link active" : 'tab-link' do
|
= link_to avis_index_path, class: (controller_name == 'avis') ? "tab-link active" : 'tab-link' do
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
Passer en usager
|
Passer en usager
|
||||||
- if gestionnaire_signed_in? && nav_bar_profile != :gestionnaire
|
- if gestionnaire_signed_in? && nav_bar_profile != :gestionnaire
|
||||||
%li
|
%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"
|
= image_tag "icons/switch-profile.svg"
|
||||||
Passer en accompagnateur
|
Passer en accompagnateur
|
||||||
- if administrateur_signed_in? && nav_bar_profile != :administrateur
|
- if administrateur_signed_in? && nav_bar_profile != :administrateur
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
Usager
|
Usager
|
||||||
- if gestionnaire_signed_in?
|
- if gestionnaire_signed_in?
|
||||||
%li
|
%li
|
||||||
= link_to(procedures_path) do
|
= link_to(gestionnaire_procedures_path) do
|
||||||
%i.fa.fa-user
|
%i.fa.fa-user
|
||||||
|
|
||||||
Accompagnateur
|
Accompagnateur
|
||||||
|
|
|
@ -21,7 +21,7 @@ describe RootController, type: :controller do
|
||||||
sign_in gestionnaire
|
sign_in gestionnaire
|
||||||
end
|
end
|
||||||
|
|
||||||
it { expect(subject).to redirect_to(procedures_path) }
|
it { expect(subject).to redirect_to(gestionnaire_procedures_path) }
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when Administrateur is connected' do
|
context 'when Administrateur is connected' do
|
||||||
|
|
|
@ -10,7 +10,7 @@ feature 'The gestionnaire part' do
|
||||||
scenario 'A gestionnaire can accept a dossier' do
|
scenario 'A gestionnaire can accept a dossier' do
|
||||||
log_in(gestionnaire.email, password)
|
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
|
click_on procedure.libelle
|
||||||
expect(page).to have_current_path(gestionnaire_procedure_path(procedure))
|
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_email', with: email
|
||||||
fill_in 'user_password', with: password
|
fill_in 'user_password', with: password
|
||||||
click_on 'Se connecter'
|
click_on 'Se connecter'
|
||||||
expect(page).to have_current_path(procedures_path)
|
expect(page).to have_current_path(gestionnaire_procedures_path)
|
||||||
end
|
end
|
||||||
|
|
||||||
def log_out
|
def log_out
|
||||||
|
|
Loading…
Reference in a new issue