mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 01:56:58 +08:00
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:

committed by
GitHub

parent
3e8d349465
commit
7df40fc905
@ -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!
|
||||
|
Reference in New Issue
Block a user