gitlab-org--gitlab-foss/spec/models/hooks/service_hook_spec.rb
Alexander Randa 330789c23c Implement web hooks logging
* implemented logging of project and system web hooks
* implemented UI for user area (project hooks)
* implemented UI for admin area (system hooks)
* implemented retry of logged webhook
* NOT imeplemented log remover
2017-05-25 10:07:52 +03:00

19 lines
471 B
Ruby

require 'spec_helper'
describe ServiceHook, models: true do
describe 'associations' do
it { is_expected.to belong_to :service }
end
describe 'execute' do
let(:hook) { build(:service_hook) }
let(:data) { { key: 'value' } }
it '#execute' do
expect(WebHookService).to receive(:new).with(hook, data, 'service_hook').and_call_original
expect_any_instance_of(WebHookService).to receive(:execute)
hook.execute(data)
end
end
end