diff options
author | Mike Greiling <mike@pixelcog.com> | 2017-10-24 07:52:21 +0000 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-10-24 07:52:21 +0000 |
commit | f7bdfe5098c9a5a3a426344ba1d7dd668212cf7e (patch) | |
tree | 5a1cb2a90b0a2b5114f6f23712b68724b3e8a7e0 /spec/requests/api/system_hooks_spec.rb | |
parent | 9cd528aa7ac5066570cb50b909951a6c6b723935 (diff) | |
parent | e16add2267648d3d3ef1d98f9b53f67a29428791 (diff) | |
download | gitlab-ce-es-module-autosave.tar.gz |
Merge branch 'master' into 'es-module-autosave'es-module-autosave
# Conflicts:
# app/assets/javascripts/issuable_form.js
# app/assets/javascripts/notes.js
Diffstat (limited to 'spec/requests/api/system_hooks_spec.rb')
-rw-r--r-- | spec/requests/api/system_hooks_spec.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/requests/api/system_hooks_spec.rb b/spec/requests/api/system_hooks_spec.rb index 216d278ad21..c7a009e999e 100644 --- a/spec/requests/api/system_hooks_spec.rb +++ b/spec/requests/api/system_hooks_spec.rb @@ -14,7 +14,7 @@ describe API::SystemHooks do it "returns authentication error" do get api("/hooks") - expect(response).to have_http_status(401) + expect(response).to have_gitlab_http_status(401) end end @@ -22,7 +22,7 @@ describe API::SystemHooks do it "returns forbidden error" do get api("/hooks", user) - expect(response).to have_http_status(403) + expect(response).to have_gitlab_http_status(403) end end @@ -30,7 +30,7 @@ describe API::SystemHooks do it "returns an array of hooks" do get api("/hooks", admin) - expect(response).to have_http_status(200) + expect(response).to have_gitlab_http_status(200) expect(response).to include_pagination_headers expect(json_response).to be_an Array expect(json_response.first['url']).to eq(hook.url) @@ -51,13 +51,13 @@ describe API::SystemHooks do it "responds with 400 if url not given" do post api("/hooks", admin) - expect(response).to have_http_status(400) + expect(response).to have_gitlab_http_status(400) end it "responds with 400 if url is invalid" do post api("/hooks", admin), url: 'hp://mep.mep' - expect(response).to have_http_status(400) + expect(response).to have_gitlab_http_status(400) end it "does not create new hook without url" do @@ -69,7 +69,7 @@ describe API::SystemHooks do it 'sets default values for events' do post api('/hooks', admin), url: 'http://mep.mep', enable_ssl_verification: true - expect(response).to have_http_status(201) + expect(response).to have_gitlab_http_status(201) expect(json_response['enable_ssl_verification']).to be true expect(json_response['tag_push_events']).to be false end @@ -78,13 +78,13 @@ describe API::SystemHooks do describe "GET /hooks/:id" do it "returns hook by id" do get api("/hooks/#{hook.id}", admin) - expect(response).to have_http_status(200) + expect(response).to have_gitlab_http_status(200) expect(json_response['event_name']).to eq('project_create') end it "returns 404 on failure" do get api("/hooks/404", admin) - expect(response).to have_http_status(404) + expect(response).to have_gitlab_http_status(404) end end @@ -93,14 +93,14 @@ describe API::SystemHooks do expect do delete api("/hooks/#{hook.id}", admin) - expect(response).to have_http_status(204) + expect(response).to have_gitlab_http_status(204) end.to change { SystemHook.count }.by(-1) end it 'returns 404 if the system hook does not exist' do delete api('/hooks/12345', admin) - expect(response).to have_http_status(404) + expect(response).to have_gitlab_http_status(404) end it_behaves_like '412 response' do |