aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/touch_later_test.rb
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2015-09-23 09:33:43 -0600
committerSean Griffin <sean@seantheprogrammer.com>2015-09-23 09:33:43 -0600
commit05436172db724cb7863571d01b86bee6ad03ada0 (patch)
tree6c0e7f15bc99a5b320d0d6342384baaeecb32993 /activerecord/test/cases/touch_later_test.rb
parent2c7d0d42ac539484918c1cf60be4f24dc5587ad0 (diff)
downloadrails-05436172db724cb7863571d01b86bee6ad03ada0.tar.gz
rails-05436172db724cb7863571d01b86bee6ad03ada0.tar.bz2
rails-05436172db724cb7863571d01b86bee6ad03ada0.zip
Don't rely on subsecond precision being applied in tests
When I originally reviewed the #20317, I believe these changes were present, but it appears that it was later updated so that they were removed. Since Travis hadn't re-run the build, this slipped through.
Diffstat (limited to 'activerecord/test/cases/touch_later_test.rb')
-rw-r--r--activerecord/test/cases/touch_later_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/touch_later_test.rb b/activerecord/test/cases/touch_later_test.rb
index b3c42c8e42..7058f4fbe2 100644
--- a/activerecord/test/cases/touch_later_test.rb
+++ b/activerecord/test/cases/touch_later_test.rb
@@ -72,7 +72,7 @@ class TouchLaterTest < ActiveRecord::TestCase
end
def test_touch_touches_immediately_with_a_custom_time
- time = Time.now.utc - 25.days
+ time = (Time.now.utc - 25.days).change(nsec: 0)
topic = Topic.create!(updated_at: time, created_at: time)
assert_equal time, topic.updated_at
assert_equal time, topic.created_at