aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/test/cases/locking_test.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/test/cases/locking_test.rb b/activerecord/test/cases/locking_test.rb
index bb76137ef5..02be0aa9e3 100644
--- a/activerecord/test/cases/locking_test.rb
+++ b/activerecord/test/cases/locking_test.rb
@@ -415,7 +415,9 @@ class OptimisticLockingTest < ActiveRecord::TestCase
assert_equal 1, car.lock_version
previously_car_updated_at = car.updated_at
- car.wheels.first.update(size: 42)
+ travel(1.day) do
+ car.wheels.first.update(size: 42)
+ end
assert_equal 1, car.reload.wheels_count
assert_not_equal previously_car_updated_at, car.updated_at