mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-28 21:07:16 +00:00
In bulk coop report service spec just check array has the same elements but don't check the order.
The #table_items methos seems to return line items in different order sometimes making this test a bit flaky. The test passed on Semaphore previously and is passing in development. I don't think the order matters so using :match_array instead of :eq.
This commit is contained in:
@@ -36,7 +36,7 @@ describe OrderManagement::Reports::BulkCoop::BulkCoopReport do
|
||||
o2.line_items << li2
|
||||
|
||||
report = OrderManagement::Reports::BulkCoop::BulkCoopReport.new user, {}, true
|
||||
expect(report.table_items).to eq([li1, li2])
|
||||
expect(report.table_items).to match_array [li1, li2]
|
||||
|
||||
report = OrderManagement::Reports::BulkCoop::BulkCoopReport.new(
|
||||
user, { q: { completed_at_gt: 2.days.ago } }, true
|
||||
@@ -60,7 +60,7 @@ describe OrderManagement::Reports::BulkCoop::BulkCoopReport do
|
||||
o2.line_items << li2
|
||||
|
||||
report = OrderManagement::Reports::BulkCoop::BulkCoopReport.new user, {}, true
|
||||
expect(report.table_items).to eq([li1, li2])
|
||||
expect(report.table_items).to match_array [li1, li2]
|
||||
|
||||
report = OrderManagement::Reports::BulkCoop::BulkCoopReport.new(
|
||||
user, { q: { distributor_id_in: [d1.id] } }, true
|
||||
|
||||
Reference in New Issue
Block a user