diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-20 15:40:28 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-20 15:40:28 +0000 |
commit | b595cb0c1dec83de5bdee18284abe86614bed33b (patch) | |
tree | 8c3d4540f193c5ff98019352f554e921b3a41a72 /spec/routing | |
parent | 2f9104a328fc8a4bddeaa4627b595166d24671d0 (diff) | |
download | gitlab-ce-b595cb0c1dec83de5bdee18284abe86614bed33b.tar.gz |
Add latest changes from gitlab-org/gitlab@15-2-stable-eev15.2.0-rc42
Diffstat (limited to 'spec/routing')
-rw-r--r-- | spec/routing/group_routing_spec.rb | 12 | ||||
-rw-r--r-- | spec/routing/project_routing_spec.rb | 24 | ||||
-rw-r--r-- | spec/routing/routing_spec.rb | 20 |
3 files changed, 32 insertions, 24 deletions
diff --git a/spec/routing/group_routing_spec.rb b/spec/routing/group_routing_spec.rb index 5c2ef62683e..9f5f821cc61 100644 --- a/spec/routing/group_routing_spec.rb +++ b/spec/routing/group_routing_spec.rb @@ -59,6 +59,18 @@ RSpec.shared_examples 'groups routing' do expect(get('/groups/gitlabhq/-/boards')).to route_to('groups/boards#index', group_id: 'gitlabhq') end + + it 'routes to the harbor repositories controller' do + expect(get("groups/#{group_path}/-/harbor/repositories")).to route_to('groups/harbor/repositories#index', group_id: group_path) + end + + it 'routes to the harbor artifacts controller' do + expect(get("groups/#{group_path}/-/harbor/repositories/test/artifacts")).to route_to('groups/harbor/artifacts#index', group_id: group_path, repository_id: 'test') + end + + it 'routes to the harbor tags controller' do + expect(get("groups/#{group_path}/-/harbor/repositories/test/artifacts/test/tags")).to route_to('groups/harbor/tags#index', group_id: group_path, repository_id: 'test', artifact_id: 'test') + end end RSpec.describe "Groups", "routing" do diff --git a/spec/routing/project_routing_spec.rb b/spec/routing/project_routing_spec.rb index 47fd1622306..1d58a31bd6e 100644 --- a/spec/routing/project_routing_spec.rb +++ b/spec/routing/project_routing_spec.rb @@ -788,20 +788,6 @@ RSpec.describe 'project routing' do it 'to #test' do expect(put('/gitlab/gitlabhq/-/settings/integrations/acme/test')).to route_to('projects/settings/integrations#test', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'acme') end - - context 'legacy routes' do - it 'to #edit' do - expect(get('/gitlab/gitlabhq/-/integrations/acme/edit')).to route_to('projects/settings/integrations#edit', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'acme') - end - - it 'to #update' do - expect(put('/gitlab/gitlabhq/-/integrations/acme')).to route_to('projects/settings/integrations#update', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'acme') - end - - it 'to #test' do - expect(put('/gitlab/gitlabhq/-/integrations/acme/test')).to route_to('projects/settings/integrations#test', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'acme') - end - end end describe Projects::Settings::IntegrationHookLogsController do @@ -812,16 +798,6 @@ RSpec.describe 'project routing' do it 'to #retry' do expect(post('/gitlab/gitlabhq/-/settings/integrations/acme/hook_logs/log/retry')).to route_to('projects/settings/integration_hook_logs#retry', namespace_id: 'gitlab', project_id: 'gitlabhq', integration_id: 'acme', id: 'log') end - - context 'legacy routes' do - it 'to #show' do - expect(get('/gitlab/gitlabhq/-/integrations/acme/hook_logs/log')).to route_to('projects/settings/integration_hook_logs#show', namespace_id: 'gitlab', project_id: 'gitlabhq', integration_id: 'acme', id: 'log') - end - - it 'to #retry' do - expect(post('/gitlab/gitlabhq/-/integrations/acme/hook_logs/log/retry')).to route_to('projects/settings/integration_hook_logs#retry', namespace_id: 'gitlab', project_id: 'gitlabhq', integration_id: 'acme', id: 'log') - end - end end describe Projects::TemplatesController, 'routing' do 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 |