diff options
author | David Workman <workmad3@gmail.com> | 2011-05-24 17:06:40 +0100 |
---|---|---|
committer | David Workman <workmad3@gmail.com> | 2011-05-24 17:06:40 +0100 |
commit | 06436b2cade183db3a231150555c4c999ca2827a (patch) | |
tree | 41bebb64d1577ac559654eacd4cd1111028356a5 /activerecord/test/cases/migration | |
parent | 86afbf7464e96dd156895eba2fa44b41678cdd6e (diff) | |
download | rails-06436b2cade183db3a231150555c4c999ca2827a.tar.gz rails-06436b2cade183db3a231150555c4c999ca2827a.tar.bz2 rails-06436b2cade183db3a231150555c4c999ca2827a.zip |
Added a test to check for correct behaviour with no options in add_index command recorder
Diffstat (limited to 'activerecord/test/cases/migration')
-rw-r--r-- | activerecord/test/cases/migration/command_recorder_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/migration/command_recorder_test.rb b/activerecord/test/cases/migration/command_recorder_test.rb index 3e404eaf70..0f79c99e1a 100644 --- a/activerecord/test/cases/migration/command_recorder_test.rb +++ b/activerecord/test/cases/migration/command_recorder_test.rb @@ -92,6 +92,12 @@ module ActiveRecord assert_equal [:remove_index, [:table, {:name => "new_index"}]], remove end + def test_invert_add_index_with_no_options + @recorder.record :add_index, [:table, [:one, :two]] + remove = @recorder.inverse.first + assert_equal [:remove_index, [:table, {:column => [:one, :two]}]], remove + end + def test_invert_rename_index @recorder.record :rename_index, [:old, :new] rename = @recorder.inverse.first |