aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorbogdanvlviv <bogdanvlviv@gmail.com>2018-02-07 11:32:02 +0200
committerbogdanvlviv <bogdanvlviv@gmail.com>2018-02-07 23:23:19 +0200
commit4444294cd95afff3e58a3d6b2b5dce213f93fcc5 (patch)
tree13d56706921fe0cb9b928ac380aa01050b9ac03b /activerecord
parent01c54e29bd288bf250b6e277046594f06b211a6f (diff)
downloadrails-4444294cd95afff3e58a3d6b2b5dce213f93fcc5.tar.gz
rails-4444294cd95afff3e58a3d6b2b5dce213f93fcc5.tar.bz2
rails-4444294cd95afff3e58a3d6b2b5dce213f93fcc5.zip
Fix `test_counter_cache_with_touch_and_lock_version` failure
https://travis-ci.org/rails/rails/jobs/338338927#L1043 Related to daf15f58b943d85d8fb726590ae94f77ca0a5d5f
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