DEV: prevents flakey spec (#25855)

Deleting the user of the message was unreliable, giving the test its own message to act on fixes it.
This commit is contained in:
Joffrey JAFFEUX 2024-02-26 09:43:29 +01:00 committed by GitHub
parent 1d5f7f92e8
commit cb118c979c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -48,6 +48,10 @@ describe "Thread preview", type: :system do
end end
context "when the user of the preview has been deleted" do context "when the user of the preview has been deleted" do
fab!(:thread_1_message_1) do
Fabricate(:chat_message, thread: thread_1, in_reply_to: message_1, use_service: true)
end
before { thread_1_message_1.user.destroy! } before { thread_1_message_1.user.destroy! }
it "shows a deleted user" do it "shows a deleted user" do