From 32c0b5a3e26a347bc97e96773ef107762a055cec Mon Sep 17 00:00:00 2001 From: David Cook Date: Fri, 1 Sep 2023 12:04:27 +1000 Subject: [PATCH] Remove unnecessary details As far as I can tell we didn't need to specify these for the tests. --- .../services/order_invoice_comparator_spec.rb | 28 ++++++++----------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/spec/services/order_invoice_comparator_spec.rb b/spec/services/order_invoice_comparator_spec.rb index 19b905d12b..4c05c814fa 100644 --- a/spec/services/order_invoice_comparator_spec.rb +++ b/spec/services/order_invoice_comparator_spec.rb @@ -67,15 +67,13 @@ describe OrderInvoiceComparator do end context "additional tax total changes" do - let(:distributor) { create(:distributor_enterprise) } let(:order) do - create(:order_with_taxes, distributor: distributor, ship_address: create(:address), - product_price: 110, tax_rate_amount: 0.1, - included_in_price: false, - tax_rate_name: "Tax 1").tap do |order| - order.create_tax_charge! - order.update_shipping_fees! - end + create(:order_with_taxes, product_price: 110, tax_rate_amount: 0.1, + included_in_price: false) + .tap do |order| + order.create_tax_charge! + order.update_shipping_fees! + end end it "returns returns true" do @@ -86,15 +84,13 @@ describe OrderInvoiceComparator do end context "included tax total changes" do - let(:distributor) { create(:distributor_enterprise) } let(:order) do - create(:order_with_taxes, distributor: distributor, ship_address: create(:address), - product_price: 110, tax_rate_amount: 0.1, - included_in_price: true, - tax_rate_name: "Tax 1").tap do |order| - order.create_tax_charge! - order.update_shipping_fees! - end + create(:order_with_taxes, product_price: 110, tax_rate_amount: 0.1, + included_in_price: true) + .tap do |order| + order.create_tax_charge! + order.update_shipping_fees! + end end it "returns returns true" do