Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-03-30 03:09:26 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-30 03:09:26 +0300
commit7c930ae00e3dd714574ebb72bab77303bd1c77c9 (patch)
tree8adf88c9ebea2861ce59b5cb34b6b13ab69666a6 /spec/routing
parent12c766c77475bb96d18846546d5af909c648830d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/routing')
-rw-r--r--spec/routing/project_routing_spec.rb28
1 files changed, 16 insertions, 12 deletions
diff --git a/spec/routing/project_routing_spec.rb b/spec/routing/project_routing_spec.rb
index f7ed8d7d5dc..c1afc35ee89 100644
--- a/spec/routing/project_routing_spec.rb
+++ b/spec/routing/project_routing_spec.rb
@@ -335,33 +335,37 @@ RSpec.describe 'project routing' do
end
end
- # test_project_hook POST /:project_id/hooks/:id/test(.:format) hooks#test
- # project_hooks GET /:project_id/hooks(.:format) hooks#index
- # POST /:project_id/hooks(.:format) hooks#create
- # edit_project_hook GET /:project_id/hooks/:id/edit(.:format) hooks#edit
- # project_hook PUT /:project_id/hooks/:id(.:format) hooks#update
- # DELETE /:project_id/hooks/:id(.:format) hooks#destroy
+ # test_project_hook POST /:project_id/-/hooks/:id/test(.:format) hooks#test
+ # project_hooks GET /:project_id/-/hooks(.:format) hooks#index
+ # POST /:project_id/-/hooks(.:format) hooks#create
+ # edit_project_hook GET /:project_id/-/hooks/:id/edit(.:format) hooks#edit
+ # project_hook PUT /:project_id/-/hooks/:id(.:format) hooks#update
+ # DELETE /:project_id/-/hooks/:id(.:format) hooks#destroy
describe Projects::HooksController, 'routing' do
it 'to #test' do
- expect(post('/gitlab/gitlabhq/hooks/1/test')).to route_to('projects/hooks#test', namespace_id: 'gitlab', project_id: 'gitlabhq', id: '1')
+ expect(post('/gitlab/gitlabhq/-/hooks/1/test')).to route_to('projects/hooks#test', namespace_id: 'gitlab', project_id: 'gitlabhq', id: '1')
end
it_behaves_like 'resource routing' do
let(:actions) { %i[index create destroy edit update] }
- let(:base_path) { '/gitlab/gitlabhq/hooks' }
+ let(:base_path) { '/gitlab/gitlabhq/-/hooks' }
end
+
+ it_behaves_like 'redirecting a legacy path', '/gitlab/gitlabhq/hooks', '/gitlab/gitlabhq/-/hooks'
end
- # retry_namespace_project_hook_hook_log POST /:project_id/hooks/:hook_id/hook_logs/:id/retry(.:format) projects/hook_logs#retry
- # namespace_project_hook_hook_log GET /:project_id/hooks/:hook_id/hook_logs/:id(.:format) projects/hook_logs#show
+ # retry_namespace_project_hook_hook_log POST /:project_id/-/hooks/:hook_id/hook_logs/:id/retry(.:format) projects/hook_logs#retry
+ # namespace_project_hook_hook_log GET /:project_id/-/hooks/:hook_id/hook_logs/:id(.:format) projects/hook_logs#show
describe Projects::HookLogsController, 'routing' do
it 'to #retry' do
- expect(post('/gitlab/gitlabhq/hooks/1/hook_logs/1/retry')).to route_to('projects/hook_logs#retry', namespace_id: 'gitlab', project_id: 'gitlabhq', hook_id: '1', id: '1')
+ expect(post('/gitlab/gitlabhq/-/hooks/1/hook_logs/1/retry')).to route_to('projects/hook_logs#retry', namespace_id: 'gitlab', project_id: 'gitlabhq', hook_id: '1', id: '1')
end
it 'to #show' do
- expect(get('/gitlab/gitlabhq/hooks/1/hook_logs/1')).to route_to('projects/hook_logs#show', namespace_id: 'gitlab', project_id: 'gitlabhq', hook_id: '1', id: '1')
+ expect(get('/gitlab/gitlabhq/-/hooks/1/hook_logs/1')).to route_to('projects/hook_logs#show', namespace_id: 'gitlab', project_id: 'gitlabhq', hook_id: '1', id: '1')
end
+
+ it_behaves_like 'redirecting a legacy path', '/gitlab/gitlabhq/hooks/hook_logs/1', '/gitlab/gitlabhq/-/hooks/hook_logs/1'
end
# project_commit GET /:project_id/commit/:id(.:format) commit#show {id: /\h{7,40}/, project_id: /[^\/]+/}