mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06: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:
committed by
GitHub
parent
e82b8c2b06
commit
69c7df2e56
@@ -465,7 +465,8 @@ describe ChatMessage do
|
||||
|
||||
it "destroys chat_mention" do
|
||||
message_1 = Fabricate(:chat_message)
|
||||
mention_1 = Fabricate(:chat_mention, chat_message: message_1)
|
||||
notification = Fabricate(:notification)
|
||||
mention_1 = Fabricate(:chat_mention, chat_message: message_1, notification: notification)
|
||||
|
||||
message_1.destroy!
|
||||
|
||||
|
||||
Reference in New Issue
Block a user