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:
@@ -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
|
||||
|
||||
|
||||
@@ -88,8 +88,8 @@ RSpec.describe Conversation, type: :model do
|
||||
|
||||
it 'creates conversation activities' do
|
||||
# create_activity
|
||||
expect(conversation.messages.pluck(:content)).to include("Conversation was marked resolved by #{old_assignee.name}")
|
||||
expect(conversation.messages.pluck(:content)).to include("Assigned to #{new_assignee.name} by #{old_assignee.name}")
|
||||
expect(conversation.messages.pluck(:content)).to include("Conversation was marked resolved by #{old_assignee.available_name}")
|
||||
expect(conversation.messages.pluck(:content)).to include("Assigned to #{new_assignee.available_name} by #{old_assignee.available_name}")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user