Commit bb7df7663a8952d60abea015f823b7acbc8c49c2
1 parent
0f31acd0
Exists in
spb-stable
and in
3 other branches
Add short path route for groups.
Showing
2 changed files
with
14 additions
and
0 deletions
Show diff stats
config/routes.rb
@@ -327,5 +327,7 @@ Gitlab::Application.routes.draw do | @@ -327,5 +327,7 @@ Gitlab::Application.routes.draw do | ||
327 | end | 327 | end |
328 | end | 328 | end |
329 | 329 | ||
330 | + get ':id' => "groups#show", constraints: {id: /(?:[^.]|\.(?!atom$))+/, format: /atom/} | ||
331 | + | ||
330 | root to: "dashboard#show" | 332 | root to: "dashboard#show" |
331 | end | 333 | end |
spec/routing/routing_spec.rb
@@ -238,3 +238,15 @@ end | @@ -238,3 +238,15 @@ end | ||
238 | describe "Authentication", "routing" do | 238 | describe "Authentication", "routing" do |
239 | # pending | 239 | # pending |
240 | end | 240 | end |
241 | + | ||
242 | +describe "Groups", "routing" do | ||
243 | + it "to #show" do | ||
244 | + get("/groups/1").should route_to('groups#show', id: '1') | ||
245 | + end | ||
246 | + | ||
247 | + it "redirect" do | ||
248 | + # get("/groups/1").should redirect_to("/groups/1") | ||
249 | + get("/1").should route_to('groups#show', id: '1') | ||
250 | + end | ||
251 | +end | ||
252 | + |