Permalink
Browse files

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

Closes #11062
  • Loading branch information...
1 parent b7f2ccd commit 179deea65b7c6dd6107dbe5930f91fa73e16ac1a @senny senny committed Aug 6, 2013
Showing with 9 additions and 0 deletions.
  1. +9 −0 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

0 comments on commit 179deea

Please sign in to comment.