diff options
Diffstat (limited to 'activerecord/test/cases/migration/change_schema_test.rb')
-rw-r--r-- | activerecord/test/cases/migration/change_schema_test.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/activerecord/test/cases/migration/change_schema_test.rb b/activerecord/test/cases/migration/change_schema_test.rb index 86451289e7..5ac4a16f33 100644 --- a/activerecord/test/cases/migration/change_schema_test.rb +++ b/activerecord/test/cases/migration/change_schema_test.rb @@ -50,7 +50,7 @@ module ActiveRecord def test_create_table_with_defaults # MySQL doesn't allow defaults on TEXT or BLOB columns. - mysql = current_adapter?(:MysqlAdapter) || current_adapter?(:Mysql2Adapter) + mysql = current_adapter?(:MysqlAdapter, :Mysql2Adapter) connection.create_table :testings do |t| t.column :one, :string, :default => "hello" @@ -99,7 +99,7 @@ module ActiveRecord assert_equal 'smallint', one.sql_type assert_equal 'integer', four.sql_type assert_equal 'bigint', eight.sql_type - elsif current_adapter?(:MysqlAdapter) or current_adapter?(:Mysql2Adapter) + elsif current_adapter?(:MysqlAdapter, :Mysql2Adapter) assert_match 'int(11)', default.sql_type assert_match 'tinyint', one.sql_type assert_match 'int', four.sql_type @@ -293,7 +293,7 @@ module ActiveRecord end assert connection.column_exists?(:testings, :foo) - refute connection.column_exists?(:testings, :bar) + assert_not connection.column_exists?(:testings, :bar) end def test_column_exists_with_type @@ -303,10 +303,10 @@ module ActiveRecord end assert connection.column_exists?(:testings, :foo, :string) - refute connection.column_exists?(:testings, :foo, :integer) + assert_not connection.column_exists?(:testings, :foo, :integer) assert connection.column_exists?(:testings, :bar, :decimal) - refute connection.column_exists?(:testings, :bar, :integer) + assert_not connection.column_exists?(:testings, :bar, :integer) end def test_column_exists_with_definition @@ -318,13 +318,13 @@ module ActiveRecord end assert connection.column_exists?(:testings, :foo, :string, limit: 100) - refute connection.column_exists?(:testings, :foo, :string, limit: nil) + assert_not connection.column_exists?(:testings, :foo, :string, limit: nil) assert connection.column_exists?(:testings, :bar, :decimal, precision: 8, scale: 2) - refute connection.column_exists?(:testings, :bar, :decimal, precision: nil, scale: nil) + assert_not connection.column_exists?(:testings, :bar, :decimal, precision: nil, scale: nil) assert connection.column_exists?(:testings, :taggable_id, :integer, null: false) - refute connection.column_exists?(:testings, :taggable_id, :integer, null: true) + assert_not connection.column_exists?(:testings, :taggable_id, :integer, null: true) assert connection.column_exists?(:testings, :taggable_type, :string, default: 'Photo') - refute connection.column_exists?(:testings, :taggable_type, :string, default: nil) + assert_not connection.column_exists?(:testings, :taggable_type, :string, default: nil) end def test_column_exists_on_table_with_no_options_parameter_supplied |