feat: Update the slack integration-flow to allow users to select the channel (#7637)

This commit is contained in:
Pranav Raj S
2023-07-28 14:50:30 -07:00
committed by GitHub
parent 4d8ba0148c
commit 9ddd428935
28 changed files with 593 additions and 131 deletions

View File

@@ -15,6 +15,20 @@ RSpec.describe HookJob do
.on_queue('medium')
end
context 'when the hook is disabled' do
it 'does not execute the job' do
hook = create(:integrations_hook, status: 'disabled', account: account)
allow(SendOnSlackJob).to receive(:perform_later)
allow(Integrations::Dialogflow::ProcessorService).to receive(:new)
allow(Integrations::GoogleTranslate::DetectLanguageService).to receive(:new)
expect(SendOnSlackJob).not_to receive(:perform_later)
expect(Integrations::GoogleTranslate::DetectLanguageService).not_to receive(:new)
expect(Integrations::Dialogflow::ProcessorService).not_to receive(:new)
described_class.perform_now(hook, event_name, event_data)
end
end
context 'when handleable events like message.created' do
let(:process_service) { double }