Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-03-31 01:42:13 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-31 01:42:13 +0300
commitd455bcf1e412ab4a4abdfbe691fc40e3d4a0ce8a (patch)
tree05455701cc0a4a220d3c1e089b39a01a310aa2a2 /spec/requests/api/system_hooks_spec.rb
parentb8cacd68a6297f2c6cdd454a3d82a487367f2e70 (diff)
Add latest changes from gitlab-org/security/gitlab@13-10-stable-ee
Diffstat (limited to 'spec/requests/api/system_hooks_spec.rb')
-rw-r--r--spec/requests/api/system_hooks_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/requests/api/system_hooks_spec.rb b/spec/requests/api/system_hooks_spec.rb
index 01b46053d52..3cea1af686e 100644
--- a/spec/requests/api/system_hooks_spec.rb
+++ b/spec/requests/api/system_hooks_spec.rb
@@ -103,15 +103,15 @@ RSpec.describe API::SystemHooks do
end
end
- describe "GET /hooks/:id" do
- it "returns hook by id" do
- get api("/hooks/#{hook.id}", admin)
- expect(response).to have_gitlab_http_status(:ok)
+ describe 'POST /hooks/:id' do
+ it "returns and trigger hook by id" do
+ post api("/hooks/#{hook.id}", admin)
+ expect(response).to have_gitlab_http_status(:created)
expect(json_response['event_name']).to eq('project_create')
end
it "returns 404 on failure" do
- get api("/hooks/404", admin)
+ post api("/hooks/404", admin)
expect(response).to have_gitlab_http_status(:not_found)
end
end