Skip to content

Commit a4446f4

Browse files
committed
Coerce failing test
1 parent 0a180ae commit a4446f4

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

test/cases/coerced_tests.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2428,6 +2428,17 @@ def test_in_order_of_with_nil_coerced
24282428
Book.where(author_id: nil, name: nil).delete_all
24292429
Book.lease_connection.add_index(:books, [:author_id, :name], unique: true)
24302430
end
2431+
2432+
# Need to remove index as SQL Server considers NULLs on a unique-index to be equal unlike PostgreSQL/MySQL/SQLite.
2433+
coerce_tests! :test_in_order_of_with_array_values_with_nil
2434+
def test_in_order_of_with_array_values_with_nil_coerced
2435+
Book.lease_connection.remove_index(:books, column: [:author_id, :name])
2436+
2437+
original_test_in_order_of_with_array_values_with_nil
2438+
ensure
2439+
Book.where(author_id: nil, name: nil).delete_all
2440+
Book.lease_connection.add_index(:books, [:author_id, :name], unique: true)
2441+
end
24312442
end
24322443

24332444
class QueryLogsTest < ActiveRecord::TestCase

0 commit comments

Comments
 (0)