aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorBen Cherry <bcherry@gmail.com>2013-08-27 16:29:48 -0700
committerBen Cherry <bcherry@gmail.com>2013-08-28 18:23:59 -0700
commit5f631d63ae3bc57119ca2102fc9bc34ad4eb1b7c (patch)
tree72fec56038999910d84b35d829c9421fd8afab86 /activerecord/test
parent1cb50949035d850a85ad0c9d0b6bd424af83a01a (diff)
downloadrails-5f631d63ae3bc57119ca2102fc9bc34ad4eb1b7c.tar.gz
rails-5f631d63ae3bc57119ca2102fc9bc34ad4eb1b7c.tar.bz2
rails-5f631d63ae3bc57119ca2102fc9bc34ad4eb1b7c.zip
Test that PostgreSQL adapter includes `usec` when quoting `DateTime`
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/adapters/postgresql/quoting_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/quoting_test.rb b/activerecord/test/cases/adapters/postgresql/quoting_test.rb
index a534f0e56a..1122f8b9a1 100644
--- a/activerecord/test/cases/adapters/postgresql/quoting_test.rb
+++ b/activerecord/test/cases/adapters/postgresql/quoting_test.rb
@@ -52,6 +52,11 @@ module ActiveRecord
c = Column.new(nil, nil, 'text')
assert_equal "'666'", @conn.quote(fixnum, c)
end
+
+ def test_quote_time_usec
+ assert_equal "'1970-01-01 00:00:00.000000'", @conn.quote(Time.at(0))
+ assert_equal "'1970-01-01 00:00:00.000000'", @conn.quote(Time.at(0).to_datetime)
+ end
end
end
end