Update SystemHooks API to expose and handle new repository_update_events
This commit is contained in:
parent
2e97db051c
commit
cfb4404ef6
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue