Commit 37f229c7 authored by Z.J. van de Weg's avatar Z.J. van de Weg

Update docs and test description

[ci skip]
parent 57fd233a
...@@ -51,10 +51,10 @@ POST /hooks ...@@ -51,10 +51,10 @@ POST /hooks
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `url` | string | yes | The hook URL | | `url` | string | yes | The hook URL |
| token | string | no | The token to validate payloads | | `token` | string | no | Secret token to validate received payloads; this will not be returned in the response |
| push_events | boolean | no | When true, the hook will fire on push events | | `push_events` | boolean | no | When true, the hook will fire on push events |
| tag_push_events | boolean | no | When true, the hook will fire on new tags being pushed | | `tag_push_events` | boolean | no | When true, the hook will fire on new tags being pushed |
| enable_ssl_verification | boolean | no | Do SSL verification when triggering the hook | | `enable_ssl_verification` | boolean | no | Do SSL verification when triggering the hook |
Example request: Example request:
......
...@@ -48,6 +48,7 @@ describe API::API, api: true do ...@@ -48,6 +48,7 @@ describe API::API, api: true do
it "responds with 400 if url not given" do it "responds with 400 if url not given" do
post api("/hooks", admin) post api("/hooks", admin)
expect(response).to have_http_status(400) expect(response).to have_http_status(400)
end end
...@@ -57,7 +58,7 @@ describe API::API, api: true do ...@@ -57,7 +58,7 @@ describe API::API, api: true do
end.not_to change { SystemHook.count } end.not_to change { SystemHook.count }
end end
it 'allows the events to be selected' do it 'sets default values for events' do
post api('/hooks', admin), url: 'http://mep.mep', enable_ssl_verification: true post api('/hooks', admin), url: 'http://mep.mep', enable_ssl_verification: true
expect(response).to have_http_status(201) expect(response).to have_http_status(201)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment