diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2013-08-28 21:43:45 -0700 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2013-08-28 21:43:45 -0700 |
commit | a7b845c27f32b6e00a7bf87aa555c41808b3e1a8 (patch) | |
tree | 4972a0b32a6900f5c8c266a442bb08475d33e9cb /activerecord/test/cases/adapters | |
parent | fb321017b6eab5c3f0c0c3187585674412ec53ae (diff) | |
parent | 5f631d63ae3bc57119ca2102fc9bc34ad4eb1b7c (diff) | |
download | rails-a7b845c27f32b6e00a7bf87aa555c41808b3e1a8.tar.gz rails-a7b845c27f32b6e00a7bf87aa555c41808b3e1a8.tar.bz2 rails-a7b845c27f32b6e00a7bf87aa555c41808b3e1a8.zip |
Merge pull request #12051 from bcherry/preserve_datetime_milliseconds
ActiveRecord: Include usecs when quoting DateTime in PostgreSQL adapter
Diffstat (limited to 'activerecord/test/cases/adapters')
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/quoting_test.rb | 5 |
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 |