Skip to content

Commit

Permalink
Merge branch 'routing-for-groups' into 'master'
Browse files Browse the repository at this point in the history
  • Loading branch information
dzaporozhets committed Apr 15, 2014
2 parents da4c13f + 61ef72e commit fd61e3e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/routes.rb
Expand Up @@ -327,5 +327,7 @@
end
end

get ':id' => "groups#show", constraints: {id: /(?:[^.]|\.(?!atom$))+/, format: /atom/}

root to: "dashboard#show"
end
11 changes: 11 additions & 0 deletions spec/routing/routing_spec.rb
Expand Up @@ -238,3 +238,14 @@
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

0 comments on commit fd61e3e

Please sign in to comment.