summaryrefslogtreecommitdiff
path: root/spec/routing
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-12-28 13:43:08 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-12-28 13:43:08 +0200
commit7f1d954873263b5406bdd25afa02b06013cb70e3 (patch)
tree3c24a39def52f5aa96a36e7b865fbd0fd1b4343a /spec/routing
parentb93c72e33a50aaed845fe333dee0201b0b11934e (diff)
downloadgitlab-ce-7f1d954873263b5406bdd25afa02b06013cb70e3.tar.gz
Fix 500 error when visit group from admin area if group name contains dotdz-improve-admin-group-routing
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec/routing')
-rw-r--r--spec/routing/admin_routing_spec.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/spec/routing/admin_routing_spec.rb b/spec/routing/admin_routing_spec.rb
index 661b671301e..99c44bde151 100644
--- a/spec/routing/admin_routing_spec.rb
+++ b/spec/routing/admin_routing_spec.rb
@@ -122,12 +122,18 @@ describe Admin::HealthCheckController, "routing" do
end
describe Admin::GroupsController, "routing" do
+ let(:name) { 'complex.group-namegit' }
+
it "to #index" do
expect(get("/admin/groups")).to route_to('admin/groups#index')
end
it "to #show" do
- expect(get("/admin/groups/gitlab")).to route_to('admin/groups#show', id: 'gitlab')
- expect(get("/admin/groups/gitlab/subgroup")).to route_to('admin/groups#show', id: 'gitlab/subgroup')
+ expect(get("/admin/groups/#{name}")).to route_to('admin/groups#show', id: name)
+ expect(get("/admin/groups/#{name}/subgroup")).to route_to('admin/groups#show', id: "#{name}/subgroup")
+ end
+
+ it "to #edit" do
+ expect(get("/admin/groups/#{name}/edit")).to route_to('admin/groups#edit', id: name)
end
end