Fix: automation email improvement (#6061)

This commit is contained in:
Tejaswini Chile
2022-12-19 13:21:33 +05:30
committed by GitHub
parent 38587b3aa1
commit 5541d9e00b
4 changed files with 37 additions and 2 deletions

View File

@@ -258,7 +258,13 @@ describe AutomationRuleListener do
end
it 'triggers automation rule send email to the team' do
expect(TeamNotifications::AutomationNotificationMailer).to receive(:conversation_creation)
message_delivery = instance_double(ActionMailer::MessageDelivery)
expect(TeamNotifications::AutomationNotificationMailer).to receive(:conversation_creation).with(
conversation, team,
'Please pay attention to this conversation, its from high priority customer'
).and_return(message_delivery)
allow(message_delivery).to receive(:deliver_now)
listener.conversation_updated(event)
end