Chatwoot/spec/lib/webhooks/trigger_spec.rb

16 lines
334 B
Ruby
Raw Normal View History

2020-02-14 17:49:17 +00:00
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