From 9771f5e178ebc1b8c5a61f813373ca3b7bd983c8 Mon Sep 17 00:00:00 2001 From: Grey Baker Date: Sun, 22 Mar 2015 11:14:51 +0000 Subject: Ignore index name in `index_exists?` when not passed a name to check for --- activerecord/test/cases/migration/index_test.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'activerecord/test/cases/migration') diff --git a/activerecord/test/cases/migration/index_test.rb b/activerecord/test/cases/migration/index_test.rb index b23b9a679f..70169e501c 100644 --- a/activerecord/test/cases/migration/index_test.rb +++ b/activerecord/test/cases/migration/index_test.rb @@ -130,7 +130,9 @@ module ActiveRecord def test_named_index_exists connection.add_index :testings, :foo, :name => "custom_index_name" + assert connection.index_exists?(:testings, :foo) assert connection.index_exists?(:testings, :foo, :name => "custom_index_name") + assert !connection.index_exists?(:testings, :foo, :name => "other_index_name") end def test_add_index_attribute_length_limit -- cgit v1.2.3