Skip to content

Commit 912096d

Browse files
authored
Merge pull request rails#48081 from shivamsinghchahar/fix-flaky-test-in-ar-token-for
Fix flaky test in AR - token_for_test
2 parents 2a7cd75 + e0ad2e7 commit 912096d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

activerecord/test/cases/token_for_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class User < ::User
104104
test "supports JSON-serializable embedded data" do
105105
snapshot_token = @user.generate_token_for(:snapshot)
106106
assert_equal @user, User.find_by_token_for(:snapshot, snapshot_token)
107-
@user.touch
107+
@user.touch(time: @user.updated_at.advance(seconds: 1))
108108
assert_nil User.find_by_token_for(:snapshot, snapshot_token)
109109
end
110110

0 commit comments

Comments
 (0)