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:
authorBob Van Landuyt <bob@vanlanduyt.co>2017-10-26 17:10:03 +0300
committerBob Van Landuyt <bob@vanlanduyt.co>2017-11-07 21:52:09 +0300
commit5d14337baff9c2ae8091b7b4ab954f8024449a52 (patch)
treed5d18ed1d0c31e5aff9d029b483eda418a0c72de /spec/routing
parent414c4e3fd83a6a3cae623dcc8135d6ef09a30562 (diff)
Free up `labels` as a group name
Diffstat (limited to 'spec/routing')
-rw-r--r--spec/routing/group_routing_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/routing/group_routing_spec.rb b/spec/routing/group_routing_spec.rb
new file mode 100644
index 00000000000..39fbf082b4d
--- /dev/null
+++ b/spec/routing/group_routing_spec.rb
@@ -0,0 +1,18 @@
+require 'spec_helper'
+
+describe 'group routing' do
+ let!(:existing_group) { create(:group, parent: create(:group, path: 'gitlab-org'), path: 'infra') }
+
+ describe 'GET #labels' do
+ it 'routes to the correct controller' do
+ expect(get('/groups/gitlab-org/infra/-/labels'))
+ .to route_to(group_id: 'gitlab-org/infra',
+ controller: 'groups/labels',
+ action: 'index')
+ end
+
+ it_behaves_like 'redirecting a legacy path', '/groups/gitlab-org/infra/labels', '/groups/gitlab-org/infra/-/labels' do
+ let(:resource) { create(:group, parent: existing_group, path: 'labels') }
+ end
+ end
+end