feat: Use display_name instead of name of the agent (#1097)

* feat: Use display_name instead of name of the agent
This commit is contained in:
Pranav Raj S
2020-07-27 22:19:26 +05:30
committed by GitHub
parent f30c8943d9
commit 2b1d445003
21 changed files with 80 additions and 41 deletions

View File

@@ -108,13 +108,13 @@ RSpec.describe ConversationReplyMailer, type: :mailer do
it 'sets reply to email to be based on the domain' do
reply_to_email = "reply+#{message.conversation.uuid}@#{conversation.account.domain}"
reply_to = "#{agent.name} <#{reply_to_email}>"
reply_to = "#{agent.available_name} <#{reply_to_email}>"
expect(mail['REPLY-TO'].value).to eq(reply_to)
expect(mail.reply_to).to eq([reply_to_email])
end
it 'sets the from email to be the support email' do
expect(mail['FROM'].value).to eq("#{agent.name} <#{conversation.account.support_email}>")
expect(mail['FROM'].value).to eq("#{agent.available_name} <#{conversation.account.support_email}>")
expect(mail.from).to eq([conversation.account.support_email])
end