aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/migration
diff options
context:
space:
mode:
authorGrey Baker <greysteil@gmail.com>2015-03-22 11:14:51 +0000
committerGrey Baker <greysteil@gmail.com>2015-12-15 17:36:09 +0000
commit9771f5e178ebc1b8c5a61f813373ca3b7bd983c8 (patch)
tree8b2c4d02f657c269b3935d6d764c6117f009b234 /activerecord/test/cases/migration
parente73fe1dd8c2740ae29e7a7f48d71a62b46e6b49d (diff)
downloadrails-9771f5e178ebc1b8c5a61f813373ca3b7bd983c8.tar.gz
rails-9771f5e178ebc1b8c5a61f813373ca3b7bd983c8.tar.bz2
rails-9771f5e178ebc1b8c5a61f813373ca3b7bd983c8.zip
Ignore index name in `index_exists?` when not passed a name to check for
Diffstat (limited to 'activerecord/test/cases/migration')
-rw-r--r--activerecord/test/cases/migration/index_test.rb2
1 files changed, 2 insertions, 0 deletions
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