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:
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