Restructure omni services and add Chatwoot research snapshot

This commit is contained in:
Ruslan Bakiev
2026-02-21 11:11:27 +07:00
parent edea7a0034
commit b73babbbf6
7732 changed files with 978203 additions and 32 deletions

View File

@@ -0,0 +1,22 @@
require 'rails_helper'
RSpec.describe AgentBots::WebhookJob do
include ActiveJob::TestHelper
subject(:job) { described_class.perform_later(url, payload, webhook_type) }
let(:url) { 'https://test.com' }
let(:payload) { { name: 'test' } }
let(:webhook_type) { :agent_bot_webhook }
it 'queues the job' do
expect { job }.to have_enqueued_job(described_class)
.with(url, payload, webhook_type)
.on_queue('high')
end
it 'executes perform' do
expect(Webhooks::Trigger).to receive(:execute).with(url, payload, webhook_type)
perform_enqueued_jobs { job }
end
end