diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2016-09-29 06:14:21 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2016-12-25 03:35:24 +0900 |
commit | 4e35d9fd4fbe7d20bae0939cc90e19d767e30528 (patch) | |
tree | bc2c97f7fe7687b9b0c5ff3b92f3a543120f3436 /activerecord/test/cases/adapters | |
parent | e8ba0c0f21e2660b90f872fa4595156ca6190c77 (diff) | |
download | rails-4e35d9fd4fbe7d20bae0939cc90e19d767e30528.tar.gz rails-4e35d9fd4fbe7d20bae0939cc90e19d767e30528.tar.bz2 rails-4e35d9fd4fbe7d20bae0939cc90e19d767e30528.zip |
Fix `remove_index` to be able to remove expression indexes
Fixes #26635, #26641.
Diffstat (limited to 'activerecord/test/cases/adapters')
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb b/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb index e6af93a53e..4de04646ed 100644 --- a/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb +++ b/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb @@ -263,9 +263,12 @@ module ActiveRecord def test_index_with_opclass with_example_table do - @connection.add_index "ex", "data varchar_pattern_ops", name: "with_opclass" - index = @connection.indexes("ex").find { |idx| idx.name == "with_opclass" } + @connection.add_index "ex", "data varchar_pattern_ops" + index = @connection.indexes("ex").find { |idx| idx.name == "index_ex_on_data_varchar_pattern_ops" } assert_equal "data varchar_pattern_ops", index.columns + + @connection.remove_index "ex", "data varchar_pattern_ops" + assert_not @connection.indexes("ex").find { |idx| idx.name == "index_ex_on_data_varchar_pattern_ops" } end end |