chore: Add reauthorization prompt for Whatsapp Channel (#5929)
- Add reauthorization prompt for Whatsapp Channel fixes: #5782
This commit is contained in:
@@ -23,6 +23,13 @@ RSpec.describe Webhooks::WhatsappEventsJob, type: :job do
|
||||
expect(Whatsapp::IncomingMessageWhatsappCloudService).to receive(:new)
|
||||
job.perform_now(params)
|
||||
end
|
||||
|
||||
it 'will not enques Whatsapp::IncomingMessageWhatsappCloudService if channel reauthorization required' do
|
||||
channel.prompt_reauthorization!
|
||||
allow(Whatsapp::IncomingMessageWhatsappCloudService).to receive(:new).and_return(process_service)
|
||||
expect(Whatsapp::IncomingMessageWhatsappCloudService).not_to receive(:new)
|
||||
job.perform_now(params)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when default provider' do
|
||||
|
||||
Reference in New Issue
Block a user