summaryrefslogtreecommitdiff
path: root/spec/routing/routing_spec.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-11-21 12:41:44 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-11-21 12:41:44 +0200
commitbeb638ca0379472eb15f840249321cdaca7bf5be (patch)
treeb776cb37b4fcb455c7a958bf25cb709f3223017d /spec/routing/routing_spec.rb
parent900999f8180e49aa1677286e3e0cfa08d47829a7 (diff)
downloadgitlab-ce-beb638ca0379472eb15f840249321cdaca7bf5be.tar.gz
Fix 404 on some group pages when name contains dotdz-fix-group-name-dot
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec/routing/routing_spec.rb')
-rw-r--r--spec/routing/routing_spec.rb18
1 files changed, 13 insertions, 5 deletions
diff --git a/spec/routing/routing_spec.rb b/spec/routing/routing_spec.rb
index 61dca5d5a62..7aba4f08088 100644
--- a/spec/routing/routing_spec.rb
+++ b/spec/routing/routing_spec.rb
@@ -261,20 +261,28 @@ describe "Authentication", "routing" do
end
describe "Groups", "routing" do
+ let(:name) { 'complex.group-name' }
+
it "to #show" do
- expect(get("/groups/1")).to route_to('groups#show', id: '1')
+ expect(get("/groups/#{name}")).to route_to('groups#show', id: name)
end
it "also display group#show on the short path" do
allow(Group).to receive(:find_by).and_return(true)
- expect(get('/1')).to route_to('groups#show', id: '1')
+ expect(get("/#{name}")).to route_to('groups#show', id: name)
end
- it "also display group#show with dot in the path" do
- allow(Group).to receive(:find_by).and_return(true)
+ it "to #activity" do
+ expect(get("/groups/#{name}/activity")).to route_to('groups#activity', id: name)
+ end
+
+ it "to #issues" do
+ expect(get("/groups/#{name}/issues")).to route_to('groups#issues', id: name)
+ end
- expect(get('/group.with.dot')).to route_to('groups#show', id: 'group.with.dot')
+ it "to #members" do
+ expect(get("/groups/#{name}/group_members")).to route_to('groups/group_members#index', group_id: name)
end
end