Skip to content

Commit bc44d41

Browse files
committed
Remove index for test
1 parent b6257ad commit bc44d41

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
@@ -363,6 +363,17 @@ def test_payload_row_count_on_select_all_coerced
363363
Book.lease_connection.add_index(:books, [:author_id, :name], unique: true)
364364
end
365365

366+
# Need to remove index as SQL Server considers NULLs on a unique-index to be equal unlike PostgreSQL/MySQL/SQLite.
367+
coerce_tests! :test_payload_row_count_on_pluck
368+
def test_payload_row_count_on_pluck_coerced
369+
connection.remove_index(:books, column: [:author_id, :name])
370+
371+
original_test_payload_row_count_on_pluck
372+
ensure
373+
Book.where(author_id: nil, name: 'row count book 2').delete_all
374+
Book.lease_connection.add_index(:books, [:author_id, :name], unique: true)
375+
end
376+
366377
# Need to remove index as SQL Server considers NULLs on a unique-index to be equal unlike PostgreSQL/MySQL/SQLite.
367378
coerce_tests! :test_payload_row_count_on_raw_sql
368379
def test_payload_row_count_on_raw_sql_coerced

0 commit comments

Comments
 (0)