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.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Fixed another MySQL flaky test (#12913)
Damian Legawiecb05ffbcc1f64
diff --git a/core/spec/models/spree/option_value_spec.rb b/core/spec/models/spree/option_value_spec.rbindex 8ac96d3d45..80509ee200 100644--- a/core/spec/models/spree/option_value_spec.rb+++ b/core/spec/models/spree/option_value_spec.rb@@ -16,13 +16,13 @@ describe Spree::OptionValue, type: :model dodescribe '#touch_all_variants' dolet!(:option_value) { create(:option_value) }+ let!(:variant1) { create(:variant, option_values: [option_value]) }+ let!(:variant2) { create(:variant, option_values: [option_value]) }it 'touches all variants associated with the option value' do- variant1 = create(:variant, option_values: [option_value])- variant2 = create(:variant, option_values: [option_value])- variant3 = create(:variant)-- expect { option_value.send(:touch_all_variants) }.to change { [variant1.reload.updated_at, variant2.reload.updated_at, variant3.reload.updated_at] }+ Timecop.travel Time.current + 1.day do+ expect { option_value.send(:touch_all_variants) }.to change { [variant1.reload.updated_at, variant2.reload.updated_at] }+ endendend