diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-07-13 15:30:52 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-07-13 15:30:52 -0700 |
commit | f7ef7caac634eba23fb339a5bcfe4734e216d04d (patch) | |
tree | be5cb6c02daae10fa84244df0ce69f631e2a66ae /activerecord/test/cases/adapters/mysql/connection_test.rb | |
parent | 8f432300b8d575ab3cd43910b7a9bf5d1de28615 (diff) | |
download | rails-f7ef7caac634eba23fb339a5bcfe4734e216d04d.tar.gz rails-f7ef7caac634eba23fb339a5bcfe4734e216d04d.tar.bz2 rails-f7ef7caac634eba23fb339a5bcfe4734e216d04d.zip |
fixing tests to deal with data differences between prepared statements and non-prepared statements
Diffstat (limited to 'activerecord/test/cases/adapters/mysql/connection_test.rb')
-rw-r--r-- | activerecord/test/cases/adapters/mysql/connection_test.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/activerecord/test/cases/adapters/mysql/connection_test.rb b/activerecord/test/cases/adapters/mysql/connection_test.rb index 2a89430da9..9227d3a2ff 100644 --- a/activerecord/test/cases/adapters/mysql/connection_test.rb +++ b/activerecord/test/cases/adapters/mysql/connection_test.rb @@ -70,11 +70,14 @@ class MysqlConnectionTest < ActiveRecord::TestCase assert_equal %w{ id data }, result.columns @connection.exec_query('INSERT INTO ex (id, data) VALUES (1, "foo")') + + # if there are no bind parameters, it will return a string (due to + # the libmysql api) result = @connection.exec_query('SELECT id, data FROM ex') assert_equal 1, result.rows.length assert_equal 2, result.columns.length - assert_equal [[1, 'foo']], result.rows + assert_equal [['1', 'foo']], result.rows end def test_exec_with_binds |