Chore: Events Cleanup (#739)
* Chore: Events Cleanup - fix failing tests - add additional webhook events - clean up event logic * Fix conversation status update in action cable Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
This commit is contained in:
@@ -20,9 +20,12 @@ describe ActionCableListener do
|
||||
let(:event_name) { :'message.created' }
|
||||
|
||||
it 'sends message to account admins, inbox agents and the contact' do
|
||||
expect(ActionCableBroadcastJob).to receive(:perform_later).with([admin.pubsub_token], 'message.created', message.push_event_data)
|
||||
expect(ActionCableBroadcastJob).to receive(:perform_later).with([agent.pubsub_token], 'message.created', message.push_event_data)
|
||||
expect(ActionCableBroadcastJob).to receive(:perform_later).with([conversation.contact.pubsub_token], 'message.created', message.push_event_data)
|
||||
expect(ActionCableBroadcastJob).to receive(:perform_later).with(
|
||||
[agent.pubsub_token, admin.pubsub_token], 'message.created', message.push_event_data
|
||||
)
|
||||
expect(ActionCableBroadcastJob).to receive(:perform_later).with(
|
||||
[conversation.contact.pubsub_token], 'message.created', message.push_event_data
|
||||
)
|
||||
listener.message_created(event)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user