Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Update flaky test example using hardcoded Promotion IDs (#11560)

Damian Legawiec8f07f9f3a398
diff --git a/core/spec/models/spree/order_spec.rb b/core/spec/models/spree/order_spec.rb
index d339d4166a..3629bf7142 100644
--- a/core/spec/models/spree/order_spec.rb
+++ b/core/spec/models/spree/order_spec.rb
@@ -1311,7 +1311,7 @@ describe Spree::Order, type: :model do
end
it 'expect return valid order promotions' do
- expect(order.valid_promotions).to eq(order.order_promotions.where(promotion_id: [2, 3]))
+ expect(order.valid_promotions).to eq(order.order_promotions.where(promotion_id: [order_promo.id, line_item_promo.id]))
end
end
end