Extract EE specific files/lines for spec/routing
We have the following files containing EE specific code. We should move them to ee/
spec/routing/admin_routing_spec.rb
diff --git a/spec/routing/admin_routing_spec.rb b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/spec/routing/admin_routing_spec.rb
index 77baaef7afd..01c05f82f37 100644
--- a/spec/routing/admin_routing_spec.rb
+++ b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/spec/routing/admin_routing_spec.rb
@@ -136,6 +136,16 @@ 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
spec/routing/group_routing_spec.rb
diff --git a/spec/routing/group_routing_spec.rb b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/spec/routing/group_routing_spec.rb
index 71788028cbf..1e0106d4f2e 100644
--- a/spec/routing/group_routing_spec.rb
+++ b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/spec/routing/group_routing_spec.rb
@@ -129,5 +129,19 @@ describe "Groups", "routing" do
let(:resource) { create(:group, parent: parent, path: 'activity') }
end
end
+
+ describe 'subgroup "boards"' do
+ it 'shows group show page' do
+ allow(Group).to receive(:find_by_full_path).with('gitlabhq/boards', any_args).and_return(true)
+
+ expect(get('/groups/gitlabhq/boards')).to route_to('groups#show', id: 'gitlabhq/boards')
+ end
+
+ it 'shows boards index page' do
+ allow(Group).to receive(:find_by_full_path).with('gitlabhq', any_args).and_return(true)
+
+ expect(get('/groups/gitlabhq/-/boards')).to route_to('groups/boards#index', group_id: 'gitlabhq')
+ end
+ end
end
end
spec/routing/project_routing_spec.rb
diff --git a/spec/routing/project_routing_spec.rb b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/spec/routing/project_routing_spec.rb
index a0d01fc8263..c914d8cd317 100644
--- a/spec/routing/project_routing_spec.rb
+++ b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/spec/routing/project_routing_spec.rb
@@ -661,4 +661,10 @@ 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
Edited by Yorick Peterse