diff options
Diffstat (limited to 'activerecord/test/cases/adapters/postgresql/timestamp_test.rb')
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/timestamp_test.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/timestamp_test.rb b/activerecord/test/cases/adapters/postgresql/timestamp_test.rb index 8246b14b93..9e631fb4ca 100644 --- a/activerecord/test/cases/adapters/postgresql/timestamp_test.rb +++ b/activerecord/test/cases/adapters/postgresql/timestamp_test.rb @@ -145,10 +145,13 @@ class TimestampTest < ActiveRecord::TestCase date = ::Time.utc(2014, 8, 17, 12, 30, 0, 999999) Foo.create!(created_at: date, updated_at: date) assert foo = Foo.find_by(created_at: date) + assert_equal 1, Foo.where(updated_at: date).count assert_equal date.to_s, foo.created_at.to_s assert_equal date.to_s, foo.updated_at.to_s assert_equal 000000, foo.created_at.usec assert_equal 999900, foo.updated_at.usec + ensure + ActiveRecord::Base.connection.drop_table(:foos, if_exists: true) end private |