Commit 95d8c346 authored by Yorick Peterse's avatar Yorick Peterse

Merge branch '6583-extract-ee-specific-lines' into 'master'

Extract EE specific files/lines for spec/routing

Closes #6583

See merge request gitlab-org/gitlab-ee!11648
parents a3949585 f4acd78a
......@@ -49,4 +49,14 @@ describe 'EE-specific admin routing' do
expect(patch("/admin/geo/nodes/#{geo_node.id}")).to route_to('admin/geo/nodes#update', id: geo_node.to_param)
end
end
describe Admin::EmailsController, 'routing' do
it 'routes to #show' do
expect(get('/admin/email')).to route_to('admin/emails#show')
end
it 'routes to #create' do
expect(post('/admin/email')).to route_to('admin/emails#create')
end
end
end
require "spec_helper"
describe 'EE-specific project routing' do
before do
allow(Project).to receive(:find_by_full_path).with('gitlab/gitlabhq', any_args).and_return(true)
end
# project_vulnerability_feedback GET /:project_id/vulnerability_feedback(.:format) projects/vulnerability_feedback#index
# POST /:project_id/vulnerability_feedback(.:format) projects/vulnerability_feedback#create
# project_vulnerability_feedback DELETE /:project_id/vulnerability_feedback/:id(.:format) projects/vulnerability_feedback#destroy
describe Projects::VulnerabilityFeedbackController, 'routing', type: :routing do
before do
allow(Project).to receive(:find_by_full_path).with('gitlab/gitlabhq', any_args).and_return(true)
end
it "to #index" do
expect(get("/gitlab/gitlabhq/vulnerability_feedback")).to route_to('projects/vulnerability_feedback#index', namespace_id: 'gitlab', project_id: 'gitlabhq')
end
......@@ -21,4 +21,11 @@ describe 'EE-specific project routing' do
expect(delete("/gitlab/gitlabhq/vulnerability_feedback/1")).to route_to('projects/vulnerability_feedback#destroy', namespace_id: 'gitlab', project_id: 'gitlabhq', id: '1')
end
end
# security_namespace_project_pipeline GET /:project_id/pipelines/:id/security(.:format)
describe Projects::PipelinesController, 'routing' do
it 'to #security' do
expect(get('/gitlab/gitlabhq/pipelines/12/security')).to route_to('projects/pipelines#security', namespace_id: 'gitlab', project_id: 'gitlabhq', id: '12')
end
end
end
......@@ -136,16 +136,6 @@ describe Admin::DashboardController, "routing" do
end
end
describe Admin::EmailsController, "routing" do
it "to #show" do
expect(get("/admin/email")).to route_to('admin/emails#show')
end
it "to #create" do
expect(post("/admin/email")).to route_to('admin/emails#create')
end
end
# admin_health_check GET /admin/health_check(.:format) admin/health_check#show
describe Admin::HealthCheckController, "routing" do
it "to #show" do
......
......@@ -661,10 +661,4 @@ describe 'project routing' do
end
end
end
describe Projects::PipelinesController, 'routing' do
it 'to #security' do
expect(get('/gitlab/gitlabhq/pipelines/12/security')).to route_to('projects/pipelines#security', namespace_id: 'gitlab', project_id: 'gitlabhq', id: '12')
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment