mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08: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:
@ -389,7 +389,10 @@ describe Auth::DefaultCurrentUserProvider do
|
|||||||
end
|
end
|
||||||
|
|
||||||
describe "#current_user" do
|
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
|
let(:unhashed_token) do
|
||||||
new_provider = provider('/')
|
new_provider = provider('/')
|
||||||
|
Reference in New Issue
Block a user