Chatwoot/spec/jobs/agent_bot_job_spec.rb
Pranav Raj S b2d5cc7b05
Feature: Introduce bots (#545)
Co-authored-by: Pranav Raj S <pranavrajs@gmail.com>
Co-authored-by: Sojan Jose <sojan@pepalo.com>
2020-03-06 01:43:12 +05:30

14 lines
346 B
Ruby

require 'rails_helper'
RSpec.describe AgentBotJob, 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('bots')
end
end