Fix: batch test assertion order

Co-authored-by: Chedli Bourguiba <chaadow@users.noreply.github.com>
This commit is contained in:
Akhil G Krishnan 2024-05-13 08:10:21 +05:30
parent 41888b1c79
commit 75bdf05d87
1 changed files with 1 additions and 1 deletions

View File

@ -390,7 +390,7 @@ class EachTest < ActiveRecord::TestCase
assert_queries_count(6 + 6) do # 6 selects, 6 updates
Developer.in_batches(of: 2).touch_all(time: time)
end
assert_equal Developer.all.pluck(:updated_at), [time] * Developer.count
assert_equal [time] * Developer.count, Developer.all.pluck(:updated_at)
end
def test_in_batches_touch_all_returns_rows_affected