fix: Email notifications (#8502)

This commit is contained in:
Muhsin Keloth
2023-12-06 15:50:23 +05:30
committed by GitHub
parent db33b7d1dc
commit 6b0d1d77d3
3 changed files with 10 additions and 10 deletions

View File

@@ -42,7 +42,7 @@ RSpec.describe AgentNotifications::ConversationNotificationsMailer do
let(:contact) { create(:contact, name: nil, account: account) }
let(:another_agent) { create(:user, email: 'agent2@example.com', account: account) }
let(:message) { create(:message, conversation: conversation, account: account, sender: another_agent) }
let(:mail) { described_class.with(account: account).conversation_mention(message, agent).deliver_now }
let(:mail) { described_class.with(account: account).conversation_mention(conversation, agent, message).deliver_now }
let(:contact_inbox) { create(:contact_inbox, account: account, inbox: conversation.inbox) }
before do
@@ -72,7 +72,7 @@ RSpec.describe AgentNotifications::ConversationNotificationsMailer do
describe 'assigned_conversation_new_message' do
let(:message) { create(:message, conversation: conversation, account: account) }
let(:mail) { described_class.with(account: account).assigned_conversation_new_message(message, agent).deliver_now }
let(:mail) { described_class.with(account: account).assigned_conversation_new_message(conversation, agent, message).deliver_now }
it 'renders the subject' do
expect(mail.subject).to eq("#{agent.available_name}, New message in your assigned conversation [ID - #{message.conversation.display_id}].")
@@ -90,7 +90,7 @@ RSpec.describe AgentNotifications::ConversationNotificationsMailer do
describe 'participating_conversation_new_message' do
let(:message) { create(:message, conversation: conversation, account: account) }
let(:mail) { described_class.with(account: account).participating_conversation_new_message(message, agent).deliver_now }
let(:mail) { described_class.with(account: account).participating_conversation_new_message(conversation, agent, message).deliver_now }
it 'renders the subject' do
expect(mail.subject).to eq("#{agent.available_name}, New message in your participating conversation [ID - #{message.conversation.display_id}].")