diff options
author | Grey Baker <greysteil@gmail.com> | 2015-03-22 11:14:51 +0000 |
---|---|---|
committer | Grey Baker <greysteil@gmail.com> | 2015-12-15 17:36:09 +0000 |
commit | 9771f5e178ebc1b8c5a61f813373ca3b7bd983c8 (patch) | |
tree | 8b2c4d02f657c269b3935d6d764c6117f009b234 /activerecord/test | |
parent | e73fe1dd8c2740ae29e7a7f48d71a62b46e6b49d (diff) | |
download | rails-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')
-rw-r--r-- | activerecord/test/cases/migration/index_test.rb | 2 |
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 |