DEV: Change Bookmarkable registration to DiscoursePluginRegistry (#20556)

Similar spirit to e195e6f614,
this moves the Bookmarkable registration to DiscoursePluginRegistry
so plugins which are not enabled do not register additional
bookmarkable classes.
This commit is contained in:
Martin Brennan
2023-03-08 10:39:12 +10:00
committed by GitHub
parent 1c881c1037
commit 360d0dde65
16 changed files with 43 additions and 46 deletions
@@ -11,10 +11,12 @@ describe ChatMessageBookmarkable do
fab!(:channel) { Fabricate(:category_channel) }
before do
Bookmark.register_bookmarkable(ChatMessageBookmarkable)
register_test_bookmarkable(ChatMessageBookmarkable)
UserChatChannelMembership.create(chat_channel: channel, user: user, following: true)
end
after { DiscoursePluginRegistry.reset! }
let!(:message1) { Fabricate(:chat_message, chat_channel: channel) }
let!(:message2) { Fabricate(:chat_message, chat_channel: channel) }
let!(:bookmark1) do