aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/migration
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2019-02-26 02:30:41 +0900
committerRyuta Kamizono <kamipo@gmail.com>2019-02-26 02:34:53 +0900
commit67732efcb658807929be0e968642ee1d90b3c986 (patch)
tree23cccff0890485c9d334cb8ba71d13679ee7a93b /activerecord/test/cases/migration
parent7d44d2a4edce4b39a232f83755e38ce1a5279074 (diff)
downloadrails-67732efcb658807929be0e968642ee1d90b3c986.tar.gz
rails-67732efcb658807929be0e968642ee1d90b3c986.tar.bz2
rails-67732efcb658807929be0e968642ee1d90b3c986.zip
Refactor `type_to_sql` to handle converting `limit` to `size` in itself
Also, improving an argument error message for `limit`, extracting around `type_to_sql` code into schema statements, and more exercise tests.
Diffstat (limited to 'activerecord/test/cases/migration')
-rw-r--r--activerecord/test/cases/migration/column_attributes_test.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/activerecord/test/cases/migration/column_attributes_test.rb b/activerecord/test/cases/migration/column_attributes_test.rb
index 3022121f4c..6f9190c110 100644
--- a/activerecord/test/cases/migration/column_attributes_test.rb
+++ b/activerecord/test/cases/migration/column_attributes_test.rb
@@ -177,10 +177,8 @@ module ActiveRecord
if current_adapter?(:Mysql2Adapter, :PostgreSQLAdapter)
def test_out_of_range_limit_should_raise
assert_raise(ActiveRecordError) { add_column :test_models, :integer_too_big, :integer, limit: 10 }
-
- unless current_adapter?(:PostgreSQLAdapter)
- assert_raise(ActiveRecordError) { add_column :test_models, :text_too_big, :text, limit: 0xfffffffff }
- end
+ assert_raise(ActiveRecordError) { add_column :test_models, :text_too_big, :text, limit: 0xfffffffff }
+ assert_raise(ActiveRecordError) { add_column :test_models, :binary_too_big, :binary, limit: 0xfffffffff }
end
end
end