diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-15 18:09:50 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-15 18:09:50 +0000 |
commit | b302502690b2e1422a4ef6abebdcf3ff4dc88543 (patch) | |
tree | 0cd7ca6ff21b59c007277b5bae9611a7cedd8134 /spec/routing | |
parent | b616fd825faac3e7f194e1f942ef30730021e463 (diff) | |
download | gitlab-ce-b302502690b2e1422a4ef6abebdcf3ff4dc88543.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/routing')
-rw-r--r-- | spec/routing/routing_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/routing/routing_spec.rb b/spec/routing/routing_spec.rb index 79edfdd2b3f..2bd23340a88 100644 --- a/spec/routing/routing_spec.rb +++ b/spec/routing/routing_spec.rb @@ -310,6 +310,26 @@ RSpec.describe "Authentication", "routing" do expect(post("/users/auth/ldapmain/callback")).not_to be_routable end end + + context 'with multiple LDAP providers configured' do + let(:ldap_settings) do + { + enabled: true, + servers: { + main: { 'provider_name' => 'ldapmain' }, + secondary: { 'provider_name' => 'ldapsecondary' } + } + } + end + + it 'POST /users/auth/ldapmain/callback' do + expect(post("/users/auth/ldapmain/callback")).to route_to('ldap/omniauth_callbacks#ldapmain') + end + + it 'POST /users/auth/ldapsecondary/callback' do + expect(post("/users/auth/ldapsecondary/callback")).to route_to('ldap/omniauth_callbacks#ldapsecondary') + end + end end end |