DEV: do not fabricate a notification when fabricating a chat_mention (#20636)

This is just a little clean-up in tests. In the past, when creating a `chat_mention` 
record, we always created a related notification. Starting from fa543cda 
notifications and chat_mentions are fully decoupled from each other. So if we're 
testing just chat mentions there is no need to fabricate notifications for them.
This commit is contained in:
Andrei Prigorshnev
2023-03-10 18:32:33 +04:00
committed by GitHub
parent 3e8d349465
commit 7df40fc905
3 changed files with 16 additions and 47 deletions

View File

@ -109,14 +109,7 @@ describe Chat::MessageMover do
it "updates references for reactions, uploads, revisions, mentions, etc." do
reaction = Fabricate(:chat_message_reaction, chat_message: message1)
upload = Fabricate(:upload_reference, target: message1)
notification = Fabricate(:notification)
mention =
Fabricate(
:chat_mention,
chat_message: message2,
user: acting_user,
notification: notification,
)
mention = Fabricate(:chat_mention, chat_message: message2, user: acting_user)
revision = Fabricate(:chat_message_revision, chat_message: message3)
webhook_event = Fabricate(:chat_webhook_event, chat_message: message3)
move!