mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 18:58:10 +00:00
DEV: correct flaky spec
This ensures that the user object is created fresh for each example. This is required for this particular spec as we can not risk having a stale object, which can lead to a flaky spec.
This commit is contained in:
parent
d0630ea6ee
commit
e89935127c
@ -389,7 +389,10 @@ describe Auth::DefaultCurrentUserProvider do
|
||||
end
|
||||
|
||||
describe "#current_user" do
|
||||
fab!(:user) { Fabricate(:user) }
|
||||
# careful using fab! here is can lead to an erratic test
|
||||
# we want a distinct user object per test so last_seen_at is
|
||||
# handled correctly
|
||||
let!(:user) { Fabricate(:user) }
|
||||
|
||||
let(:unhashed_token) do
|
||||
new_provider = provider('/')
|
||||
|
Loading…
x
Reference in New Issue
Block a user