Skip to content

Commit 1548e92

Browse files
committed
Coerce test so index removed
1 parent f676608 commit 1548e92

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/cases/coerced_tests.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2086,6 +2086,17 @@ def test_in_order_of_with_enums_values_coerced
20862086
Book.connection.add_index(:books, [:author_id, :name], unique: true)
20872087
end
20882088

2089+
# Need to remove index as SQL Server considers NULLs on a unique-index to be equal unlike PostgreSQL/MySQL/SQLite.
2090+
coerce_tests! :test_in_order_of_with_string_column
2091+
def test_in_order_of_with_string_column_coerced
2092+
Book.connection.remove_index(:books, column: [:author_id, :name])
2093+
2094+
original_test_in_order_of_with_string_column
2095+
ensure
2096+
Book.where(author_id: nil, name: nil).delete_all
2097+
Book.connection.add_index(:books, [:author_id, :name], unique: true)
2098+
end
2099+
20892100
# Need to remove index as SQL Server considers NULLs on a unique-index to be equal unlike PostgreSQL/MySQL/SQLite.
20902101
coerce_tests! :test_in_order_of_with_enums_keys
20912102
def test_in_order_of_with_enums_keys_coerced

0 commit comments

Comments
 (0)