DEV: fixes a flakey spec (#20721)

This commit is contained in:
Joffrey JAFFEUX 2023-03-17 18:01:19 +01:00 committed by GitHub
parent 184ce647ea
commit c5e5b6d5ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,12 @@ RSpec.describe BookmarksController do
let(:bookmark_message) { Fabricate(:chat_message) }
let(:bookmark_user) { current_user }
before { sign_in(current_user) }
before do
register_test_bookmarkable(Chat::MessageBookmarkable)
sign_in(current_user)
end
after { DiscoursePluginRegistry.reset_register!(:bookmarkables) }
context "when bookmarking a chat message" do
describe "#create" do