diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2015-02-14 07:46:10 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2015-02-19 11:24:01 +0900 |
commit | 949b1336266d3de25d5d84911c7a43f7da3121bf (patch) | |
tree | 6a7f77eb1e7955fee3b3f3dc7f16a7153525121a /activerecord/test | |
parent | 95ee93892a07f90fdfd503c7ea07abf0fb397bec (diff) | |
download | rails-949b1336266d3de25d5d84911c7a43f7da3121bf.tar.gz rails-949b1336266d3de25d5d84911c7a43f7da3121bf.tar.bz2 rails-949b1336266d3de25d5d84911c7a43f7da3121bf.zip |
Should handle array option for `:cast_as`
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/change_schema_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/change_schema_test.rb b/activerecord/test/cases/adapters/postgresql/change_schema_test.rb index 6c1b29f7fe..5a9796887c 100644 --- a/activerecord/test/cases/adapters/postgresql/change_schema_test.rb +++ b/activerecord/test/cases/adapters/postgresql/change_schema_test.rb @@ -26,6 +26,13 @@ module ActiveRecord connection.change_column :strings, :somedate, :timestamp, cast_as: :timestamp assert_equal :datetime, connection.columns(:strings).find { |c| c.name == 'somedate' }.type end + + def test_change_type_with_array + connection.change_column :strings, :somedate, :timestamp, array: true, cast_as: :timestamp + column = connection.columns(:strings).find { |c| c.name == 'somedate' } + assert_equal :datetime, column.type + assert column.array? + end end end end |