From 96eaec908d3e348f95c1e1fbde492addf1883e40 Mon Sep 17 00:00:00 2001 From: David Cook Date: Tue, 21 Feb 2023 13:05:34 +1100 Subject: [PATCH] Remove unused mock in specs It looks like it was expected that the price and amount columns would be formatted, but this is not currently the case. So I cleaned this up to be less ambiguous. If any of these columns were to be configured for formatting, this line could be added back to test for unformatted output. --- .../order_cycle_customer_totals_report_spec.rb | 1 - spec/lib/reports/products_and_inventory_report_spec.rb | 1 - spec/lib/reports/report_spec.rb | 3 +-- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/spec/lib/reports/orders_and_fulfillment/order_cycle_customer_totals_report_spec.rb b/spec/lib/reports/orders_and_fulfillment/order_cycle_customer_totals_report_spec.rb index d970d6c3d6..6b9ce4121d 100644 --- a/spec/lib/reports/orders_and_fulfillment/order_cycle_customer_totals_report_spec.rb +++ b/spec/lib/reports/orders_and_fulfillment/order_cycle_customer_totals_report_spec.rb @@ -118,7 +118,6 @@ describe Reporting::Reports::OrdersAndFulfillment::OrderCycleCustomerTotals do end it "shows the correct payment fee amount for the order" do - allow(report).to receive(:raw_render?).and_return(true) expect(report.rows.last.pay_fee_price).to eq completed_payment.adjustment.amount end end diff --git a/spec/lib/reports/products_and_inventory_report_spec.rb b/spec/lib/reports/products_and_inventory_report_spec.rb index 39b9cfb3a2..1ec1786f66 100644 --- a/spec/lib/reports/products_and_inventory_report_spec.rb +++ b/spec/lib/reports/products_and_inventory_report_spec.rb @@ -49,7 +49,6 @@ module Reporting double(name: "taxon2")] allow(variant).to receive_message_chain(:product, :group_buy_unit_size).and_return(21) allow(subject).to receive(:query_result).and_return [variant] - allow(subject).to receive(:raw_render?).and_return(true) expect(subject.table_rows).to eq([[ "Supplier", diff --git a/spec/lib/reports/report_spec.rb b/spec/lib/reports/report_spec.rb index 5ba8f9a4ba..0eeea08fe5 100644 --- a/spec/lib/reports/report_spec.rb +++ b/spec/lib/reports/report_spec.rb @@ -124,7 +124,7 @@ module Reporting end it "get correct data" do - allow(subject).to receive(:raw_render?).and_return(true) + allow(subject).to receive(:unformatted_render?).and_return(true) @expected_table_rows = [ [5, "My Hub"], [12, "My Other Hub"], @@ -156,7 +156,6 @@ module Reporting { group_by: :customer, header: true } ] allow(subject).to receive(:display_header_row?).and_return(true) - allow(subject).to receive(:raw_render?).and_return(true) @expected_rows = [ { header: "Hub 1" }, { header: "Abby" },