Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

test to express that we can't turn non-array columns to array columns.

Closes #11062
  • Loading branch information...
commit 179deea65b7c6dd6107dbe5930f91fa73e16ac1a 1 parent b7f2ccd
@senny senny authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 activerecord/test/cases/adapters/postgresql/array_test.rb
View
9 activerecord/test/cases/adapters/postgresql/array_test.rb
@@ -39,6 +39,15 @@ def test_change_column_with_array
assert column.array
end
+ def test_change_column_cant_make_non_array_column_to_array
+ @connection.add_column :pg_arrays, :a_string, :string
+ assert_raises ActiveRecord::StatementInvalid do
+ @connection.transaction do
+ @connection.change_column :pg_arrays, :a_string, :string, array: true
+ end
+ end
+ end
+
def test_type_cast_array
assert @column
Please sign in to comment.
Something went wrong with that request. Please try again.