mirror of
https://github.com/discourse/discourse.git
synced 2025-02-16 08:15:00 +00:00
DEV: Fix extremely rare test failure
If this was the first test to run, the Fabricate(:user) would be given the same ID as the Fabricate.build(:user, id: 1). This works around it.
This commit is contained in:
parent
7ec124fc89
commit
e8f32dd3ba
@ -108,6 +108,9 @@ describe UserGuardian do
|
||||
end
|
||||
|
||||
context "hidden profile" do
|
||||
# Mixing Fabricate.build() and Fabricate() could cause ID clashes, so override :user
|
||||
let(:user) { Fabricate(:user) }
|
||||
|
||||
let(:hidden_user) do
|
||||
result = Fabricate(:user)
|
||||
result.user_option.update_column(:hide_profile_and_presence, true)
|
||||
|
Loading…
x
Reference in New Issue
Block a user