Permalink
Browse files

Added a test to check for correct behaviour with no options in add_in…

…dex command recorder
  • Loading branch information...
1 parent 86afbf7 commit 06436b2cade183db3a231150555c4c999ca2827a @workmad3 workmad3 committed May 24, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 activerecord/test/cases/migration/command_recorder_test.rb
@@ -92,6 +92,12 @@ def test_invert_add_index_with_name
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

0 comments on commit 06436b2

Please sign in to comment.