Fix RESTfulness of project hook deletions by API

This commit is contained in:
Matt Humphrey 2013-02-20 11:35:36 +00:00
parent b7ac654b88
commit 33c513274d
3 changed files with 5 additions and 6 deletions

View file

@ -275,11 +275,10 @@ describe Gitlab::API do
end
end
describe "DELETE /projects/:id/hooks" do
describe "DELETE /projects/:id/hooks/:hook_id" do
it "should delete hook from project" do
expect {
delete api("/projects/#{project.id}/hooks", user),
delete api("/projects/#{project.id}/hooks/#{hook.id}", user),
hook_id: hook.id
}.to change {project.hooks.count}.by(-1)
end