feat: Enable template variables in channel greeting messages (#6971)
This commit is contained in:
@@ -91,6 +91,7 @@ RSpec.describe AutomationRules::ActionService do
|
||||
describe '#perform with send_email_transcript action' do
|
||||
before do
|
||||
rule.actions << { action_name: 'send_email_transcript', action_params: ['contact@example.com, agent@example.com,agent1@example.com'] }
|
||||
rule.save
|
||||
end
|
||||
|
||||
it 'will send email to transcript to action params emails' do
|
||||
@@ -102,6 +103,17 @@ RSpec.describe AutomationRules::ActionService do
|
||||
|
||||
described_class.new(rule, account, conversation).perform
|
||||
end
|
||||
|
||||
it 'will send email to transcript to contacts' do
|
||||
rule.actions = [{ action_name: 'send_email_transcript', action_params: ['{{contact.email}}'] }]
|
||||
rule.save
|
||||
|
||||
mailer = double
|
||||
allow(ConversationReplyMailer).to receive(:with).and_return(mailer)
|
||||
allow(mailer).to receive(:conversation_transcript).with(conversation, conversation.contact.email)
|
||||
|
||||
described_class.new(rule.reload, account, conversation).perform
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user