aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/mysql2/boolean_test.rb
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2013-08-07 17:59:27 +0200
committerYves Senn <yves.senn@gmail.com>2013-11-11 16:15:00 +0100
commit07ae1e9b5557182f69e5ffbac54b334284abf36f (patch)
treed160eab55a7f40da7101d5ff1a52eecd744f0b36 /activerecord/test/cases/adapters/mysql2/boolean_test.rb
parent07790d5832e1822ce7278f05db1fe8394b5eb780 (diff)
downloadrails-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/boolean_test.rb')
-rw-r--r--activerecord/test/cases/adapters/mysql2/boolean_test.rb6
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