mirror of
https://github.com/discourse/discourse.git
synced 2026-08-17 16:35:03 -05:00
DEV: do not fabricate a Notification when fabricating a ChatMention (#20450)
Initially, the chat_mention db table was created to support notifications. So when creating
a `chat_mention` record we were always creating a related `notification` record. So did the
ChatMention fabricator.
Now we want to use the chat_mention db table in other scenarios. So we started decoupling
mentions from notification in 75b81b68.
This removes fabrication of Notifications from the ChatMention fabricator. We need to be able
to fabricate a ChatMention without a Notification.
This commit is contained in:
@@ -109,7 +109,14 @@ 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)
|
||||
mention = Fabricate(:chat_mention, chat_message: message2, user: acting_user)
|
||||
notification = Fabricate(:notification)
|
||||
mention =
|
||||
Fabricate(
|
||||
:chat_mention,
|
||||
chat_message: message2,
|
||||
user: acting_user,
|
||||
notification: notification,
|
||||
)
|
||||
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