summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-10-19 10:34:31 +0000
committerRémy Coutable <remy@rymai.me>2016-10-20 16:54:54 +0200
commit3fdd00afc73e05ad413be18d9cdbbe2e3c74b465 (patch)
tree5abb5a2de31d410ea638570a2bb0faed8c08eb64 /spec
parentd2aa46b71e7060524ed47d9a1b9fbb7c6ec0127b (diff)
downloadgitlab-ce-3fdd00afc73e05ad413be18d9cdbbe2e3c74b465.tar.gz
Merge branch 'fix-system-hook-api' into 'master'
API: Fix Sytem hooks delete behavior ## What does this MR do? This corrects the delete API for system hooks. Returning 200 is not the right way indicating a hooks is not found. ## What are the relevant issue numbers? Discussed in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6861/diffs#609af00c90e3d5241064d1404e3e018a3235634a_64_62 See merge request !6883
Diffstat (limited to 'spec')
-rw-r--r--spec/requests/api/system_hooks_spec.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/requests/api/system_hooks_spec.rb b/spec/requests/api/system_hooks_spec.rb
index 1ce2658569e..f8a1aed5441 100644
--- a/spec/requests/api/system_hooks_spec.rb
+++ b/spec/requests/api/system_hooks_spec.rb
@@ -73,9 +73,10 @@ describe API::API, api: true do
end.to change { SystemHook.count }.by(-1)
end
- it "returns success if hook id not found" do
- delete api("/hooks/12345", admin)
- expect(response).to have_http_status(200)
+ it 'returns 404 if the system hook does not exist' do
+ delete api('/hooks/12345', admin)
+
+ expect(response).to have_http_status(404)
end
end
end