diff options
author | Andrew8xx8 <avk@8xx8.ru> | 2013-03-24 23:55:51 +0400 |
---|---|---|
committer | Andrew8xx8 <avk@8xx8.ru> | 2013-03-24 23:55:51 +0400 |
commit | 718ec26a23e3e303e04c569447acf963b9ef307e (patch) | |
tree | c0566af8b7899b7c2e814123c544a61d9e93d265 /spec/routing | |
parent | 9e2525cbd0da4204f93937e368e277be38d1a7b3 (diff) |
Routing updated to support global snippets
Diffstat (limited to 'spec/routing')
-rw-r--r-- | spec/routing/routing_spec.rb | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/spec/routing/routing_spec.rb b/spec/routing/routing_spec.rb index 5ad8165ecce..3d7db8ac217 100644 --- a/spec/routing/routing_spec.rb +++ b/spec/routing/routing_spec.rb @@ -25,6 +25,51 @@ describe "Mounted Apps", "routing" do end end +# snippets GET /snippets(.:format) snippets#index +# POST /snippets(.:format) snippets#create +# new_snippet GET /snippets/new(.:format) snippets#new +# edit_snippet GET /snippets/:id/edit(.:format) snippets#edit +# snippet GET /snippets/:id(.:format) snippets#show +# PUT /snippets/:id(.:format) snippets#update +# DELETE /snippets/:id(.:format) snippets#destroy +describe SnippetsController, "routing" do + it "to #user_index" do + get("/s/User").should route_to('snippets#user_index', username: 'User') + end + + it "to #raw" do + get("/snippets/1/raw").should route_to('snippets#raw', id: '1') + end + + it "to #index" do + get("/snippets").should route_to('snippets#index') + end + + it "to #create" do + post("/snippets").should route_to('snippets#create') + end + + it "to #new" do + get("/snippets/new").should route_to('snippets#new') + end + + it "to #edit" do + get("/snippets/1/edit").should route_to('snippets#edit', id: '1') + end + + it "to #show" do + get("/snippets/1").should route_to('snippets#show', id: '1') + end + + it "to #update" do + put("/snippets/1").should route_to('snippets#update', id: '1') + end + + it "to #destroy" do + delete("/snippets/1").should route_to('snippets#destroy', id: '1') + end +end + # help GET /help(.:format) help#index # help_permissions GET /help/permissions(.:format) help#permissions # help_workflow GET /help/workflow(.:format) help#workflow |