diff options
author | Yves Senn <yves.senn@gmail.com> | 2013-08-07 17:59:27 +0200 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2013-11-11 16:15:00 +0100 |
commit | 07ae1e9b5557182f69e5ffbac54b334284abf36f (patch) | |
tree | d160eab55a7f40da7101d5ff1a52eecd744f0b36 /activerecord/test/cases/adapters/mysql2 | |
parent | 07790d5832e1822ce7278f05db1fe8394b5eb780 (diff) | |
download | rails-07ae1e9b5557182f69e5ffbac54b334284abf36f.tar.gz rails-07ae1e9b5557182f69e5ffbac54b334284abf36f.tar.bz2 rails-07ae1e9b5557182f69e5ffbac54b334284abf36f.zip |
Unifies mysql and mysql2 casting of booleans.
Diffstat (limited to 'activerecord/test/cases/adapters/mysql2')
-rw-r--r-- | activerecord/test/cases/adapters/mysql2/boolean_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/cases/adapters/mysql2/boolean_test.rb b/activerecord/test/cases/adapters/mysql2/boolean_test.rb index 7d23ba28d2..267aa232d9 100644 --- a/activerecord/test/cases/adapters/mysql2/boolean_test.rb +++ b/activerecord/test/cases/adapters/mysql2/boolean_test.rb @@ -46,8 +46,8 @@ class Mysql2BooleanTest < ActiveRecord::TestCase assert_equal 1, attributes["archived"] assert_equal "1", attributes["published"] - assert_equal "t", @connection.type_cast(true, boolean_column) - assert_equal "t", @connection.type_cast(true, string_column) + assert_equal 1, @connection.type_cast(true, boolean_column) + assert_equal 1, @connection.type_cast(true, string_column) end test "test type casting without emulated booleans" do @@ -60,7 +60,7 @@ class Mysql2BooleanTest < ActiveRecord::TestCase assert_equal "1", attributes["published"] assert_equal 1, @connection.type_cast(true, boolean_column) - assert_equal "t", @connection.type_cast(true, string_column) + assert_equal 1, @connection.type_cast(true, string_column) end test "with booleans stored as 1 and 0" do |