aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activerecord/test/cases/adapters/postgresql/change_schema_test.rb5
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