diff options
Diffstat (limited to 'spec/requests/api/project_hooks_spec.rb')
-rw-r--r-- | spec/requests/api/project_hooks_spec.rb | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/spec/requests/api/project_hooks_spec.rb b/spec/requests/api/project_hooks_spec.rb index 81fe68de662..5037575d355 100644 --- a/spec/requests/api/project_hooks_spec.rb +++ b/spec/requests/api/project_hooks_spec.rb @@ -61,10 +61,9 @@ describe API::API, 'ProjectHooks', api: true do describe "POST /projects/:id/hooks" do it "should add hook to project" do - expect { - post api("/projects/#{project.id}/hooks", user), - url: "http://example.com", issues_events: true - }.to change {project.hooks.count}.by(1) + expect do + post api("/projects/#{project.id}/hooks", user), url: "http://example.com", issues_events: true + end.to change {project.hooks.count}.by(1) expect(response.status).to eq(201) end @@ -105,9 +104,9 @@ describe API::API, 'ProjectHooks', api: true do describe "DELETE /projects/:id/hooks/:hook_id" do it "should delete hook from project" do - expect { + expect do delete api("/projects/#{project.id}/hooks/#{hook.id}", user) - }.to change {project.hooks.count}.by(-1) + end.to change {project.hooks.count}.by(-1) expect(response.status).to eq(200) end |