diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-12-01 11:46:45 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-12-01 11:46:57 -0800 |
commit | e47b523fae8680d71178297f7e913099430d5f2a (patch) | |
tree | 9dc40c26e1cdd8019a819ea4a9ef19d65fab4450 /activerecord/test | |
parent | 89d1dcd8cc23a5d6807c6374ae32c6b3b3bd3471 (diff) | |
download | rails-e47b523fae8680d71178297f7e913099430d5f2a.tar.gz rails-e47b523fae8680d71178297f7e913099430d5f2a.tar.bz2 rails-e47b523fae8680d71178297f7e913099430d5f2a.zip |
ugh, forgot to add this test to cdd90f39d796986dabf1678b3277b230dbe18961
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/change_schema_test.rb | 5 |
1 files changed, 5 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 ec1b446dab..6c1b29f7fe 100644 --- a/activerecord/test/cases/adapters/postgresql/change_schema_test.rb +++ b/activerecord/test/cases/adapters/postgresql/change_schema_test.rb @@ -21,6 +21,11 @@ module ActiveRecord connection.change_column :strings, :somedate, :timestamp, using: 'CAST("somedate" AS timestamp)' assert_equal :datetime, connection.columns(:strings).find { |c| c.name == 'somedate' }.type end + + def test_change_type_with_symbol + connection.change_column :strings, :somedate, :timestamp, cast_as: :timestamp + assert_equal :datetime, connection.columns(:strings).find { |c| c.name == 'somedate' }.type + end end end end |