aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/migration/index_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases/migration/index_test.rb')
-rw-r--r--activerecord/test/cases/migration/index_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/cases/migration/index_test.rb b/activerecord/test/cases/migration/index_test.rb
index 70169e501c..5b3d13d2f7 100644
--- a/activerecord/test/cases/migration/index_test.rb
+++ b/activerecord/test/cases/migration/index_test.rb
@@ -135,6 +135,14 @@ module ActiveRecord
assert !connection.index_exists?(:testings, :foo, :name => "other_index_name")
end
+ def test_remove_named_index
+ connection.add_index :testings, :foo, :name => "custom_index_name"
+
+ assert connection.index_exists?(:testings, :foo)
+ connection.remove_index :testings, :foo
+ assert !connection.index_exists?(:testings, :foo)
+ end
+
def test_add_index_attribute_length_limit
connection.add_index :testings, [:foo, :bar], :length => {:foo => 10, :bar => nil}