aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/migration/columns_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases/migration/columns_test.rb')
-rw-r--r--activerecord/test/cases/migration/columns_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/cases/migration/columns_test.rb b/activerecord/test/cases/migration/columns_test.rb
index 5fc7702dfa..ab3f584350 100644
--- a/activerecord/test/cases/migration/columns_test.rb
+++ b/activerecord/test/cases/migration/columns_test.rb
@@ -267,6 +267,13 @@ module ActiveRecord
assert_nil TestModel.new.first_name
end
+ def test_change_column_default_with_from_and_to
+ add_column "test_models", "first_name", :string
+ connection.change_column_default "test_models", "first_name", from: nil, to: "Tester"
+
+ assert_equal "Tester", TestModel.new.first_name
+ end
+
def test_remove_column_no_second_parameter_raises_exception
assert_raise(ArgumentError) { connection.remove_column("funny") }
end