Merge branch 'routing-for-groups' into 'master'

Routing for groups

Implements http://feedback.gitlab.com/forums/176466-general/suggestions/5723800-group-url-on-root-path-groups-name-instead-of-g
This commit is contained in:
Dmitriy Zaporozhets 2014-04-15 10:36:52 +00:00
commit fd61e3e901
2 changed files with 13 additions and 0 deletions

View File

@ -327,5 +327,7 @@ Gitlab::Application.routes.draw do
end
end
get ':id' => "groups#show", constraints: {id: /(?:[^.]|\.(?!atom$))+/, format: /atom/}
root to: "dashboard#show"
end

View File

@ -238,3 +238,14 @@ end
describe "Authentication", "routing" do
# pending
end
describe "Groups", "routing" do
it "to #show" do
get("/groups/1").should route_to('groups#show', id: '1')
end
it "also display group#show on the short path" do
get("/1").should route_to('groups#show', id: '1')
end
end