diff options
author | Sean Griffin <sean@thoughtbot.com> | 2015-01-01 10:11:33 -0700 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2015-01-01 10:11:33 -0700 |
commit | d08dc3795924b58a79d58358697df16602da9110 (patch) | |
tree | bc67be597f8de2c4c5cd650f7b48e6909213fea4 /activerecord/test/cases | |
parent | 45973ac3c7ffef1fc5d46c3ee2e673f856f24106 (diff) | |
download | rails-d08dc3795924b58a79d58358697df16602da9110.tar.gz rails-d08dc3795924b58a79d58358697df16602da9110.tar.bz2 rails-d08dc3795924b58a79d58358697df16602da9110.zip |
Stop relying on columns for type information in mysql2 casting tests
The column itself has no actual impact on the return value. These were
actually testing the behavior of the type object, which is sufficiently
covered elsewhere.
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/adapters/mysql2/boolean_test.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/activerecord/test/cases/adapters/mysql2/boolean_test.rb b/activerecord/test/cases/adapters/mysql2/boolean_test.rb index 03627135b2..0e641ba3bf 100644 --- a/activerecord/test/cases/adapters/mysql2/boolean_test.rb +++ b/activerecord/test/cases/adapters/mysql2/boolean_test.rb @@ -47,8 +47,7 @@ class Mysql2BooleanTest < ActiveRecord::TestCase assert_equal 1, attributes["archived"] 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) end test "test type casting without emulated booleans" do @@ -60,8 +59,7 @@ class Mysql2BooleanTest < ActiveRecord::TestCase assert_equal 1, attributes["archived"] 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) end test "with booleans stored as 1 and 0" do |