diff options
author | Arthur Neves <arthurnn@gmail.com> | 2014-03-12 11:50:50 -0400 |
---|---|---|
committer | Arthur Neves <arthurnn@gmail.com> | 2014-03-12 11:50:50 -0400 |
commit | 66d61ab63b8f0d6acb42a3343507b44b4591caae (patch) | |
tree | 3c54df2a2cf352bb331c8ac1ae2007b07cf85de7 /activerecord | |
parent | 591b8f395d101ad1a3b009b98de0e6bd2a5d6222 (diff) | |
download | rails-66d61ab63b8f0d6acb42a3343507b44b4591caae.tar.gz rails-66d61ab63b8f0d6acb42a3343507b44b4591caae.tar.bz2 rails-66d61ab63b8f0d6acb42a3343507b44b4591caae.zip |
Unit test for mysql quote time usec
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/adapters/mysql2/connection_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapters/mysql2/connection_test.rb b/activerecord/test/cases/adapters/mysql2/connection_test.rb index 9b7202c915..98febd2d75 100644 --- a/activerecord/test/cases/adapters/mysql2/connection_test.rb +++ b/activerecord/test/cases/adapters/mysql2/connection_test.rb @@ -97,6 +97,13 @@ class MysqlConnectionTest < ActiveRecord::TestCase @connection.execute "DROP TABLE `bar_baz`" end + if mysql_56? + def test_quote_time_usec + assert_equal "'1970-01-01 00:00:00.000000'", @connection.quote(Time.at(0)) + assert_equal "'1970-01-01 00:00:00.000000'", @connection.quote(Time.at(0).to_datetime) + end + end + private def run_without_connection |