summaryrefslogtreecommitdiff
path: root/spec/routing
diff options
context:
space:
mode:
authorValery Sizov <valery@gitlab.com>2017-10-20 16:39:01 +0300
committerValery Sizov <valery@gitlab.com>2017-10-22 21:55:58 +0300
commitee1b89ae2b1b456d6cb1b9cdd931bd98a9295f07 (patch)
tree6620e04ae1c1d3198524ee8c80be23883a3e1cb4 /spec/routing
parent090aefdc246c0b9f2c5381c63c4c5b6ec2e11722 (diff)
downloadgitlab-ce-ee1b89ae2b1b456d6cb1b9cdd931bd98a9295f07.tar.gz
Backport EE changes to group routesbackort_routes_group_routes_from_ee
Diffstat (limited to 'spec/routing')
-rw-r--r--spec/routing/routing_spec.rb12
1 files changed, 3 insertions, 9 deletions
diff --git a/spec/routing/routing_spec.rb b/spec/routing/routing_spec.rb
index a45839b16f5..407d19c3b2a 100644
--- a/spec/routing/routing_spec.rb
+++ b/spec/routing/routing_spec.rb
@@ -285,17 +285,15 @@ end
describe "Groups", "routing" do
let(:name) { 'complex.group-namegit' }
-
- before do
- allow_any_instance_of(GroupUrlConstrainer).to receive(:matches?).and_return(true)
- end
+ let!(:group) { create(:group, name: name) }
it "to #show" do
expect(get("/groups/#{name}")).to route_to('groups#show', id: name)
end
it "also supports nested groups" do
- expect(get("/#{name}/#{name}")).to route_to('groups#show', id: "#{name}/#{name}")
+ nested_group = create(:group, parent: group)
+ expect(get("/#{name}/#{nested_group.name}")).to route_to('groups#show', id: "#{name}/#{nested_group.name}")
end
it "also display group#show on the short path" do
@@ -313,10 +311,6 @@ describe "Groups", "routing" do
it "to #members" do
expect(get("/groups/#{name}/group_members")).to route_to('groups/group_members#index', group_id: name)
end
-
- it "also display group#show with slash in the path" do
- expect(get('/group/subgroup')).to route_to('groups#show', id: 'group/subgroup')
- end
end
describe HealthCheckController, 'routing' do