mirror of
https://github.com/lingble/chatwoot.git
synced 2025-10-30 02:32:29 +00:00
chore: Add controllers for conversation participants (#6462)
Co-authored-by: Aswin Dev P.S <aswindevps@gmail.com> Co-authored-by: Sojan Jose <sojan@chatwoot.com>
This commit is contained in:
@@ -51,6 +51,14 @@ RSpec.describe Notification do
|
||||
expect(notification.push_message_title).to eq "[New message] - ##{notification.conversation.display_id} "
|
||||
end
|
||||
|
||||
it 'returns appropriate title suited for the notification type participating_conversation_new_message' do
|
||||
message = create(:message, sender: create(:user), content: Faker::Lorem.paragraphs(number: 2))
|
||||
notification = create(:notification, notification_type: 'participating_conversation_new_message', primary_actor: message)
|
||||
|
||||
expect(notification.push_message_title).to eq "[New message] - ##{notification.conversation.display_id} \
|
||||
#{message.content.truncate_words(10)}"
|
||||
end
|
||||
|
||||
it 'returns appropriate title suited for the notification type conversation_mention' do
|
||||
message = create(:message, sender: create(:user), content: 'Hey [@John](mention://user/1/john), can you check this ticket?')
|
||||
notification = create(:notification, notification_type: 'conversation_mention', primary_actor: message, secondary_actor: message.sender)
|
||||
|
||||
Reference in New Issue
Block a user