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.

Fix flaky Order reimbursement_id spec (#11561)

Damian Legawiecdd361b81cdd5
diff --git a/core/spec/models/spree/order_spec.rb b/core/spec/models/spree/order_spec.rb
index 3629bf7142..50afc1450d 100644
--- a/core/spec/models/spree/order_spec.rb
+++ b/core/spec/models/spree/order_spec.rb
@@ -971,7 +971,8 @@ describe Spree::Order, type: :model do
context 'a reimbursement related refund exists' do
let(:order) { refund.payment.order }
- let(:refund) { create(:refund, reimbursement_id: 123, amount: 5) }
+ let(:reimbursement) { create(:reimbursement) }
+ let(:refund) { create(:refund, reimbursement_id: reimbursement.id, amount: 5) }
it { is_expected.to eq false }
end