diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 05291ef1a..03048b045 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -200,6 +200,7 @@ class ApplicationController < ActionController::Base roles = [ current_user, current_instructeur, + current_expert, current_administrateur, current_gestionnaire, current_super_admin diff --git a/spec/system/experts/expert_spec.rb b/spec/system/experts/expert_spec.rb index 4a9e91952..c383161ad 100644 --- a/spec/system/experts/expert_spec.rb +++ b/spec/system/experts/expert_spec.rb @@ -52,6 +52,7 @@ describe 'Inviting an expert:' do expect(page).to have_current_path(new_user_session_path) login_as avis.expert.user, scope: :user sign_in_with(avis.expert.email, 'This is a very complicated password !') + expect(page).to have_content("connecté en tant qu’expert") click_on 'Passer en usager' expect(page).to have_current_path(dossiers_path) end