diff options
author | José Valim <jose.valim@gmail.com> | 2011-06-18 19:34:39 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-06-18 19:34:39 -0700 |
commit | 7d4606156b9d2b1900e99b9fb5cd08529b8f95a0 (patch) | |
tree | 15de4a53c7a1e097872b899bb0f9b8d9fbff90a2 /activerecord/test | |
parent | 4054435b28d0abbad0278dbdec3d432a284c8959 (diff) | |
parent | 3cc83a8f24ba61b648a2728efc113388cf1ec243 (diff) | |
download | rails-7d4606156b9d2b1900e99b9fb5cd08529b8f95a0.tar.gz rails-7d4606156b9d2b1900e99b9fb5cd08529b8f95a0.tar.bz2 rails-7d4606156b9d2b1900e99b9fb5cd08529b8f95a0.zip |
Merge pull request #1763 from grantneufeld/schema_column_exists_options_hash
Fix default options argument on ActiveRecord::ConnectionAdaptors::Table#column_exists?
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/migration_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb index bf7565a0d0..93a1249e43 100644 --- a/activerecord/test/cases/migration_test.rb +++ b/activerecord/test/cases/migration_test.rb @@ -1071,6 +1071,18 @@ if ActiveRecord::Base.connection.supports_migrations? Person.connection.drop_table :testings rescue nil end + def test_column_exists_on_table_with_no_options_parameter_supplied + Person.connection.create_table :testings do |t| + t.string :foo + end + Person.connection.change_table :testings do |t| + assert t.column_exists?(:foo) + assert !(t.column_exists?(:bar)) + end + ensure + Person.connection.drop_table :testings rescue nil + end + def test_add_table assert !Reminder.table_exists? |