Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…dex command recorder
  • Loading branch information...
commit 06436b2cade183db3a231150555c4c999ca2827a 1 parent 86afbf7
@workmad3 workmad3 authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 activerecord/test/cases/migration/command_recorder_test.rb
View
6 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
Please sign in to comment.
Something went wrong with that request. Please try again.