diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-01 18:09:52 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-01 18:09:52 +0300 |
commit | 41aebff8ec728c167298aa44e037d8e324e00e8d (patch) | |
tree | f51c379dd4b78f9ecb57175e9dc073d6debe74e5 /spec/routing | |
parent | 8c438dd7a6063d7f59bce4d79cc7ca49a31a8346 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/routing')
-rw-r--r-- | spec/routing/project_routing_spec.rb | 6 | ||||
-rw-r--r-- | spec/routing/routing_spec.rb | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/spec/routing/project_routing_spec.rb b/spec/routing/project_routing_spec.rb index 43d7c31d87f..fe04a1d7c4a 100644 --- a/spec/routing/project_routing_spec.rb +++ b/spec/routing/project_routing_spec.rb @@ -320,9 +320,11 @@ RSpec.describe 'project routing' do expect(get('/gitlab/gitlabhq/-/snippets/1')).to route_to('projects/snippets#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: '1') end - it 'to #show from unscope routing' do - expect(get('/gitlab/gitlabhq/snippets/1')).to route_to('projects/snippets#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: '1') + it 'to #raw from unscope routing' do + expect(get('/gitlab/gitlabhq/snippets/1/raw')).to route_to('projects/snippets#raw', namespace_id: 'gitlab', project_id: 'gitlabhq', id: '1') end + + it_behaves_like 'redirecting a legacy path', '/gitlab/gitlabhq/snippets/1', '/gitlab/gitlabhq/-/snippets/1' end # test_project_hook POST /:project_id/-/hooks/:id/test(.:format) hooks#test diff --git a/spec/routing/routing_spec.rb b/spec/routing/routing_spec.rb index 69c0ae7a945..4d95d5631e4 100644 --- a/spec/routing/routing_spec.rb +++ b/spec/routing/routing_spec.rb @@ -96,9 +96,11 @@ RSpec.describe SnippetsController, "routing" do expect(get("/-/snippets/1")).to route_to('snippets#show', id: '1') end - it 'to #show from unscoped routing' do - expect(get("/snippets/1")).to route_to('snippets#show', id: '1') + it 'to #raw from unscoped routing' do + expect(get("/snippets/1/raw")).to route_to('snippets#raw', id: '1') end + + it_behaves_like 'redirecting a legacy path', '/snippets/1', '/-/snippets/1' end # help GET /help(.:format) help#index |