diff options
author | Dylan Thacker-Smith <Dylan.Smith@shopify.com> | 2014-07-06 01:49:19 -0400 |
---|---|---|
committer | Dylan Thacker-Smith <Dylan.Smith@shopify.com> | 2014-07-06 02:43:34 -0400 |
commit | 42be84ba40d95561554a4ccd62f482b028454025 (patch) | |
tree | 8357e189744a38339c730a8dce039bdf6e6c6156 /activerecord/test/cases/adapters | |
parent | 93e24dea60368db17f92eac79122b36c30655297 (diff) | |
download | rails-42be84ba40d95561554a4ccd62f482b028454025.tar.gz rails-42be84ba40d95561554a4ccd62f482b028454025.tar.bz2 rails-42be84ba40d95561554a4ccd62f482b028454025.zip |
active_record: Type cast booleans and durations for string columns.
Diffstat (limited to 'activerecord/test/cases/adapters')
-rw-r--r-- | activerecord/test/cases/adapters/mysql2/boolean_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/adapters/mysql2/boolean_test.rb b/activerecord/test/cases/adapters/mysql2/boolean_test.rb index 267aa232d9..f3c711a64b 100644 --- a/activerecord/test/cases/adapters/mysql2/boolean_test.rb +++ b/activerecord/test/cases/adapters/mysql2/boolean_test.rb @@ -47,7 +47,7 @@ class Mysql2BooleanTest < ActiveRecord::TestCase assert_equal "1", attributes["published"] assert_equal 1, @connection.type_cast(true, boolean_column) - assert_equal 1, @connection.type_cast(true, string_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 1, @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 |