diff options
author | Jeff Dean <jeff@zilkey.com> | 2010-06-09 00:13:24 -0400 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2010-06-23 16:21:29 +1200 |
commit | e639536ea80e94f5d72493267c8aec21d305cf74 (patch) | |
tree | a58ec1e8811012f77c55b6d2b9b85fd4792aa1b8 /activerecord/test/cases | |
parent | 995b1a243cf8450b976eb40613f5cb703a22159a (diff) | |
download | rails-e639536ea80e94f5d72493267c8aec21d305cf74.tar.gz rails-e639536ea80e94f5d72493267c8aec21d305cf74.tar.bz2 rails-e639536ea80e94f5d72493267c8aec21d305cf74.zip |
remove_column should raise an ArgumentError when no columns are passed [#4803 state:resolved]
Signed-off-by: Michael Koziarski <michael@koziarski.com>
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/migration_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb index 6fe3b01281..9ece2fbab1 100644 --- a/activerecord/test/cases/migration_test.rb +++ b/activerecord/test/cases/migration_test.rb @@ -748,6 +748,10 @@ if ActiveRecord::Base.connection.supports_migrations? ActiveRecord::Base.connection.drop_table(:hats) end + def test_remove_column_no_second_parameter_raises_exception + assert_raise(ArgumentError) { Person.connection.remove_column("funny") } + end + def test_change_type_of_not_null_column assert_nothing_raised do Topic.connection.change_column "topics", "written_on", :datetime, :null => false |