From f25b1361eebe1d88902ab616b55c82047e983ee7 Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Tue, 19 Nov 2024 15:51:11 +0100 Subject: [PATCH] fix(profile): senticify profiles list --- app/controllers/users/sessions_controller.rb | 2 +- spec/system/experts/expert_spec.rb | 2 +- spec/system/sessions/sign_in_spec.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/users/sessions_controller.rb b/app/controllers/users/sessions_controller.rb index 7b764fbff..e45f22ae0 100644 --- a/app/controllers/users/sessions_controller.rb +++ b/app/controllers/users/sessions_controller.rb @@ -20,7 +20,7 @@ class Users::SessionsController < Devise::SessionsController super if current_account.count > 1 - flash[:notice] = t("devise.sessions.signed_in_multiple_profile", roles: current_account.keys.map { |role| t("layouts.#{role}") }.join(', ')) + flash[:notice] = t("devise.sessions.signed_in_multiple_profile", roles: current_account.keys.map { |role| t("layouts.#{role}") }.to_sentence) end end diff --git a/spec/system/experts/expert_spec.rb b/spec/system/experts/expert_spec.rb index 433bead97..352c7947c 100644 --- a/spec/system/experts/expert_spec.rb +++ b/spec/system/experts/expert_spec.rb @@ -40,7 +40,7 @@ describe 'Inviting an expert:', js: true do visit new_user_session_path sign_in_with avis.expert.email, password - expect(page).to have_content('Vous pouvez à tout moment alterner entre vos différents profils : expert, usager.') + expect(page).to have_content('Vous pouvez à tout moment alterner entre vos différents profils : expert et usager.') expect(page).to have_current_path(expert_all_avis_path) end end diff --git a/spec/system/sessions/sign_in_spec.rb b/spec/system/sessions/sign_in_spec.rb index 2b76affa5..f4aa98da3 100644 --- a/spec/system/sessions/sign_in_spec.rb +++ b/spec/system/sessions/sign_in_spec.rb @@ -28,7 +28,7 @@ describe 'Signin in:' do sign_in_with user.email, password expect(page).to have_current_path admin_procedures_path - expect(page).to have_content('Vous êtes connecté(e) ! Vous pouvez à tout moment alterner entre vos différents profils : administrateur, instructeur, usager.') + expect(page).to have_content('Vous êtes connecté(e) ! Vous pouvez à tout moment alterner entre vos différents profils : administrateur, instructeur et usager.') end end