diff options
author | Gabriel Mazetto <brodock@gmail.com> | 2017-05-05 18:00:32 +0200 |
---|---|---|
committer | Gabriel Mazetto <brodock@gmail.com> | 2017-05-12 23:26:48 +0100 |
commit | cfb4404ef6464ed4780bc7619268287716ae5e73 (patch) | |
tree | 09d3bc9b06687830963ef2d8aeef72886ad03d59 | |
parent | 2e97db051ca52d464382df0c84562fbc5e67b956 (diff) | |
download | gitlab-ce-cfb4404ef6464ed4780bc7619268287716ae5e73.tar.gz |
Update SystemHooks API to expose and handle new repository_update_events
-rw-r--r-- | lib/api/entities.rb | 2 | ||||
-rw-r--r-- | spec/requests/api/system_hooks_spec.rb | 3 | ||||
-rw-r--r-- | spec/requests/api/v3/system_hooks_spec.rb | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 00d494f02f5..3fc2b453eb6 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -53,7 +53,7 @@ module API end class Hook < Grape::Entity - expose :id, :url, :created_at, :push_events, :tag_push_events + expose :id, :url, :created_at, :push_events, :tag_push_events, :repository_update_events expose :enable_ssl_verification end diff --git a/spec/requests/api/system_hooks_spec.rb b/spec/requests/api/system_hooks_spec.rb index c7b84173570..2eb191d6049 100644 --- a/spec/requests/api/system_hooks_spec.rb +++ b/spec/requests/api/system_hooks_spec.rb @@ -32,8 +32,9 @@ describe API::SystemHooks do expect(response).to include_pagination_headers expect(json_response).to be_an Array expect(json_response.first['url']).to eq(hook.url) - expect(json_response.first['push_events']).to be true + expect(json_response.first['push_events']).to be false expect(json_response.first['tag_push_events']).to be false + expect(json_response.first['repository_update_events']).to be true end end end diff --git a/spec/requests/api/v3/system_hooks_spec.rb b/spec/requests/api/v3/system_hooks_spec.rb index 72c7d14b8ba..ae427541abb 100644 --- a/spec/requests/api/v3/system_hooks_spec.rb +++ b/spec/requests/api/v3/system_hooks_spec.rb @@ -31,8 +31,9 @@ describe API::V3::SystemHooks do expect(response).to have_http_status(200) expect(json_response).to be_an Array expect(json_response.first['url']).to eq(hook.url) - expect(json_response.first['push_events']).to be true + expect(json_response.first['push_events']).to be false expect(json_response.first['tag_push_events']).to be false + expect(json_response.first['repository_update_events']).to be true end end end |