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
Fix specs for VAT calculation. (#11678)
Matthew Kennedya9e450e0e6df
diff --git a/core/spec/models/spree/price_spec.rb b/core/spec/models/spree/price_spec.rbindex 53ad61af8b..3aa551f54b 100644--- a/core/spec/models/spree/price_spec.rb+++ b/core/spec/models/spree/price_spec.rb@@ -115,8 +115,8 @@ describe Spree::Price, type: :model doallow(variant).to receive(:tax_category).and_return(tax_category)expect(price).to receive(:default_zone).at_least(:once).and_return(default_zone)allow(price).to receive(:apply_foreign_vat?).and_return(true)- allow(price).to receive(:included_tax_amount).with(tax_zone: default_zone, tax_category: tax_category).and_return(0.19)- allow(price).to receive(:included_tax_amount).with(tax_zone: zone, tax_category: tax_category).and_return(0.25)+ allow(price).to receive(:included_tax_amount).with({ tax_zone: default_zone, tax_category: tax_category }).and_return(0.19)+ allow(price).to receive(:included_tax_amount).with({ tax_zone: zone, tax_category: tax_category }).and_return(0.25)endit 'returns the correct price including another VAT to two digits' do@@ -166,8 +166,8 @@ describe Spree::Price, type: :model doallow(variant).to receive(:tax_category).and_return(tax_category)expect(price).to receive(:default_zone).at_least(:once).and_return(default_zone)allow(price).to receive(:apply_foreign_vat?).and_return(true)- allow(price).to receive(:included_tax_amount).with(tax_zone: default_zone, tax_category: tax_category).and_return(0.19)- allow(price).to receive(:included_tax_amount).with(tax_zone: zone, tax_category: tax_category).and_return(0.25)+ allow(price).to receive(:included_tax_amount).with({ tax_zone: default_zone, tax_category: tax_category }).and_return(0.19)+ allow(price).to receive(:included_tax_amount).with({ tax_zone: zone, tax_category: tax_category }).and_return(0.25)endit 'returns the correct price including another VAT to two digits' do