aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2014-02-07 17:08:09 -0800
committerAndrew White <andyw@pixeltrix.co.uk>2014-02-07 17:08:09 -0800
commit3f90787cd25a45a621fbb7238f69ee96f26e8f74 (patch)
tree7ecfae049e4fbe48df38bb730780aa6519e970da /activerecord
parented66361488752aa115f8d95175cde6dd24f3496d (diff)
downloadrails-3f90787cd25a45a621fbb7238f69ee96f26e8f74.tar.gz
rails-3f90787cd25a45a621fbb7238f69ee96f26e8f74.tar.bz2
rails-3f90787cd25a45a621fbb7238f69ee96f26e8f74.zip
Adjust test value so that timezone has no effect
If the test is run in a timezone that is behind UTC it fails because the time generated is ahead of 0000-01-01 00:00:00. Just increase the time subtracted so that timezone has no effect.
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/test/cases/adapters/postgresql/timestamp_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/timestamp_test.rb b/activerecord/test/cases/adapters/postgresql/timestamp_test.rb
index 89210866f0..4d29a20e66 100644
--- a/activerecord/test/cases/adapters/postgresql/timestamp_test.rb
+++ b/activerecord/test/cases/adapters/postgresql/timestamp_test.rb
@@ -77,7 +77,7 @@ class TimestampTest < ActiveRecord::TestCase
end
def test_bc_timestamp
- date = Date.new(0) - 1.second
+ date = Date.new(0) - 1.week
Developer.create!(:name => "aaron", :updated_at => date)
assert_equal date, Developer.find_by_name("aaron").updated_at
end