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 00c8151 commit 2f20c6c5ba6e76a7a9abf17f208b697464fbde22 @workmad3 workmad3 committed with tenderlove May 24, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 activerecord/test/cases/migration/command_recorder_test.rb
@@ -97,6 +97,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 2f20c6c

Please sign in to comment.