Chatwoot/spec/jobs/webhook_job_spec.rb

15 lines
349 B
Ruby
Raw Permalink Normal View History

2020-02-14 17:49:17 +00:00
require 'rails_helper'
RSpec.describe WebhookJob, type: :job do
subject(:job) { described_class.perform_later(url, payload) }
let(:url) { 'https://test.com' }
let(:payload) { { name: 'test' } }
it 'queues the job' do
expect { job }.to have_enqueued_job(described_class)
.with(url, payload)
.on_queue('webhooks')
end
end