diff --git a/ee/config/routes/group.rb b/ee/config/routes/group.rb index d1abb52efb4724f6d2ee816ba63cdcbf32aa0f25..8811b60cca26e94218797137b7dc23ec53477e45 100644 --- a/ee/config/routes/group.rb +++ b/ee/config/routes/group.rb @@ -112,12 +112,6 @@ resource :dependency_proxy, only: [:show, :update] end - - scope(path: 'groups/*group_id') do - Gitlab::Routing.redirect_legacy_paths(self, :analytics, :ldap, :ldap_group_links, - :notification_setting, :audit_events, - :pipeline_quota, :hooks, :boards) - end end # Dependency proxy for containers diff --git a/ee/spec/requests/group_routing_spec.rb b/ee/spec/requests/group_routing_spec.rb deleted file mode 100644 index 978404b5a064432103423b63d1ae105f644892ec..0000000000000000000000000000000000000000 --- a/ee/spec/requests/group_routing_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -require 'spec_helper' - -describe 'Deprecated boards paths' do - let!(:group) { create(:group, name: 'gitlabhq') } - - context 'when no group called boards exists' do - it 'redirects to boards page' do - get('/groups/gitlabhq/boards') - - expect(response).to redirect_to('/groups/gitlabhq/-/boards') - end - - it 'redirects to the boards page with additional params' do - get('/groups/gitlabhq/boards/1?foo=bar') - - expect(response).to redirect_to(group_board_path(group, 1, foo: 'bar')) - end - end - - context 'when a group called boards exists', :nested_groups do - before do - create(:group, name: 'boards', parent: group) - end - - it 'does not redirect to the main boards page' do - get('/groups/gitlabhq/boards') - - expect(response).to have_gitlab_http_status(200) - end - - it 'does not redirect to the boards page with additional params' do - get('/groups/gitlabhq/boards/-/issues') - - expect(response).to have_gitlab_http_status(200) - end - - it 'redirects to the boards page with additional params if there is no matching route on the subgroup' do - get('/groups/gitlabhq/boards/1?foo=bar') - - expect(response).to redirect_to(group_board_path(group, 1, foo: 'bar')) - end - end -end diff --git a/ee/spec/routing/group_routing_spec.rb b/ee/spec/routing/group_routing_spec.rb index 9d435dfc710b9839b972020d562c3298486bb73f..2dca469dcbb65ffab8802f150f36419638e48d6c 100644 --- a/ee/spec/routing/group_routing_spec.rb +++ b/ee/spec/routing/group_routing_spec.rb @@ -17,44 +17,6 @@ end end - describe 'legacy redirection' do - %w(analytics - boards - ldap - ldap_group_links - notification_setting - audit_events - pipeline_quota hooks).each do |legacy_reserved_path| - describe legacy_reserved_path do - it_behaves_like 'redirecting a legacy path', - "/groups/complex.group-namegit/#{legacy_reserved_path}", - "/groups/complex.group-namegit/-/#{legacy_reserved_path}" do - let!(:parent) { create(:group, path: 'complex.group-namegit') } - let(:resource) { create(:group, parent: parent, path: legacy_reserved_path) } - end - end - end - - context 'multiple redirects' do - include RSpec::Rails::RequestExampleGroup - - let!(:parent) { create(:group, path: 'complex.group-namegit') } - - it 'follows multiple redirects' do - expect(get('/groups/complex.group-namegit/boards/issues')) - .to redirect_to('/groups/complex.group-namegit/-/boards/issues') - end - - it 'does not redirect when the nested group exists' do - boards_group = create(:group, path: 'boards', parent: parent) - create(:group, path: 'issues', parent: boards_group) - - expect(get('/groups/complex.group-namegit/boards/issues')) - .to eq(200) - end - end - end - describe 'security' do it 'shows group dashboard' do allow(Group).to receive(:find_by_full_path).with('gitlabhq', any_args).and_return(true)