Hide gestionnaire login link (unified login)
This commit is contained in:
parent
c8b7d0eeb3
commit
86e6dd0233
2 changed files with 17 additions and 2 deletions
|
@ -31,7 +31,8 @@
|
|||
= render partial: 'administrateurs/login_banner'
|
||||
-else
|
||||
= link_to "Utilisateur", '/users/sign_in', method: :get, :class => 'btn btn-md'
|
||||
= link_to "Accompagnateur", '/gestionnaires/sign_in', method: :get, :class => 'btn btn-md'
|
||||
-unless Features.unified_login
|
||||
= link_to "Accompagnateur", '/gestionnaires/sign_in', method: :get, :class => 'btn btn-md'
|
||||
= link_to "Administrateur", '/administrateurs/sign_in', method: :get, :class => 'btn btn-md'
|
||||
|
||||
- if Rails.env != 'production'
|
||||
|
|
|
@ -40,4 +40,18 @@ describe RootController, type: :controller do
|
|||
|
||||
it { expect(response.body).to have_css('#landing') }
|
||||
end
|
||||
end
|
||||
|
||||
context "unified login" do
|
||||
render_views
|
||||
|
||||
before do
|
||||
allow(Features).to receive(:unified_login).and_return(true)
|
||||
subject
|
||||
end
|
||||
|
||||
it "won't have gestionnaire login link" do
|
||||
expect(response.body).to have_css("a[href='#{new_user_session_path}']")
|
||||
expect(response.body).to_not have_css("a[href='#{new_gestionnaire_session_path}']")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue