fix: Update flaky notification tests (#1728)

This commit is contained in:
Pranav Raj S
2021-02-03 17:55:27 +05:30
committed by GitHub
parent 5d5e75ce9c
commit 7748e0c56e
3 changed files with 10 additions and 6 deletions
+7 -4
View File
@@ -59,12 +59,15 @@ describe NotificationListener do
allow(builder).to receive(:perform)
create(:inbox_member, user: agent_with_notification, inbox: inbox)
create(:inbox_member, user: agent_with_out_notification, inbox: inbox)
conversation.reload
message = build(:message, conversation: conversation, account: account,
content: "hi [#{agent_with_notification.name}](mention://user/#{agent_with_notification.id}/\
#{agent_with_notification.name})", private: true)
message = build(
:message,
conversation: conversation,
account: account,
content: "hi [#{agent_with_notification.name}](mention://user/#{agent_with_notification.id}/#{agent_with_notification.name})",
private: true
)
event = Events::Base.new(event_name, Time.zone.now, message: message)
listener.message_created(event)