diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-04 18:36:22 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-04 18:36:22 +0300 |
commit | bcc4e4dc7ed0740e92a61fc82c3c669f8f2d8d30 (patch) | |
tree | 1df3e2d68cd524af4dce107b2e4227778bb3945d /spec/routing/routing_spec.rb | |
parent | 211e435ade337c968fab11c52427c172adcec99a (diff) | |
parent | e0af7cefb4c92b474d14116b40927d70c13e78cc (diff) | |
download | gitlab-ce-bcc4e4dc7ed0740e92a61fc82c3c669f8f2d8d30.tar.gz |
Merge branch 'gist' of https://github.com/Andrew8xx8/gitlabhq into Andrew8xx8-gist
Conflicts:
Gemfile.lock
app/models/ability.rb
app/models/project.rb
app/views/snippets/_form.html.haml
db/schema.rb
features/steps/shared/paths.rb
spec/factories.rb
spec/models/project_spec.rb
Diffstat (limited to 'spec/routing/routing_spec.rb')
-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 b6135b4ca81..aa3952f74b6 100644 --- a/spec/routing/routing_spec.rb +++ b/spec/routing/routing_spec.rb @@ -19,6 +19,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 |