From 3153e99497327ef936fb8776c343c8bfec298362 Mon Sep 17 00:00:00 2001 From: Carlos Chitty Date: Wed, 30 Apr 2025 13:42:36 -0400 Subject: [PATCH] Update OpenOrderCycleJob test "syncing remote products" to expect 58 queries instead of 59 The main point of the test is to alert us if the query count increased (https://github.com/openfoodfoundation/openfoodnetwork/pull/13232#discussion_r2199896280). The missing query in rails 7.1: Spree::StockItem Load SELECT "spree_stock_items"."id", "spree_stock_items"."variant_id", "spree_stock_items"."count_on_hand", "spree_stock_items"."created_at", "spree_stock_items"."updated_at", "spree_stock_items"."backorderable", "spree_stock_items"."deleted_at", "spree_stock_items"."lock_version" FROM "spree_stock_items" WHERE "spree_stock_items"."id" = $1 LIMIT $2 FOR UPDATE --- spec/jobs/open_order_cycle_job_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/jobs/open_order_cycle_job_spec.rb b/spec/jobs/open_order_cycle_job_spec.rb index bf7c84d5ab..c6d1d1d27e 100644 --- a/spec/jobs/open_order_cycle_job_spec.rb +++ b/spec/jobs/open_order_cycle_job_spec.rb @@ -71,7 +71,7 @@ RSpec.describe OpenOrderCycleJob do .and change { variant.on_demand }.to(true) .and change { variant.on_hand }.by(0) .and change { variant_discontinued.on_hand }.to(0) - .and query_database 59 + .and query_database 58 end end