diff options
author | Alexander Randa <randa.alex@gmail.com> | 2017-04-20 08:31:37 +0000 |
---|---|---|
committer | Alexander Randa <randa.alex@gmail.com> | 2017-04-28 11:49:57 +0000 |
commit | c504b88f07f03d381e7b2e22a129413319508413 (patch) | |
tree | a35e54288cea3960fcef4b107879afe7c62dae82 /spec/routing/admin_routing_spec.rb | |
parent | ef518df28adc1366d868cb990952e87f60e8b0eb (diff) | |
download | gitlab-ce-c504b88f07f03d381e7b2e22a129413319508413.tar.gz |
Implement ability to update hooks
Diffstat (limited to 'spec/routing/admin_routing_spec.rb')
-rw-r--r-- | spec/routing/admin_routing_spec.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/spec/routing/admin_routing_spec.rb b/spec/routing/admin_routing_spec.rb index 99c44bde151..e5fc0b676af 100644 --- a/spec/routing/admin_routing_spec.rb +++ b/spec/routing/admin_routing_spec.rb @@ -71,13 +71,15 @@ describe Admin::ProjectsController, "routing" do end end -# admin_hook_test GET /admin/hooks/:hook_id/test(.:format) admin/hooks#test +# admin_hook_test GET /admin/hooks/:id/test(.:format) admin/hooks#test # admin_hooks GET /admin/hooks(.:format) admin/hooks#index # POST /admin/hooks(.:format) admin/hooks#create # admin_hook DELETE /admin/hooks/:id(.:format) admin/hooks#destroy +# PUT /admin/hooks/:id(.:format) admin/hooks#update +# edit_admin_hook GET /admin/hooks/:id(.:format) admin/hooks#edit describe Admin::HooksController, "routing" do it "to #test" do - expect(get("/admin/hooks/1/test")).to route_to('admin/hooks#test', hook_id: '1') + expect(get("/admin/hooks/1/test")).to route_to('admin/hooks#test', id: '1') end it "to #index" do @@ -88,6 +90,14 @@ describe Admin::HooksController, "routing" do expect(post("/admin/hooks")).to route_to('admin/hooks#create') end + it "to #edit" do + expect(get("/admin/hooks/1/edit")).to route_to('admin/hooks#edit', id: '1') + end + + it "to #update" do + expect(put("/admin/hooks/1")).to route_to('admin/hooks#update', id: '1') + end + it "to #destroy" do expect(delete("/admin/hooks/1")).to route_to('admin/hooks#destroy', id: '1') end |