Feature: Webhooks (#489)
This commit is contained in:
15
spec/lib/webhooks/trigger_spec.rb
Normal file
15
spec/lib/webhooks/trigger_spec.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
require 'rails_helper'
|
||||
|
||||
describe Webhooks::Trigger do
|
||||
subject(:trigger) { described_class }
|
||||
|
||||
describe '#execute' do
|
||||
it 'triggers webhook' do
|
||||
params = { hello: 'hello' }
|
||||
url = 'htpps://test.com'
|
||||
|
||||
expect(RestClient).to receive(:post).with(url, params).once
|
||||
trigger.execute(url, params)
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user