fix the failing test

This commit is contained in:
Mohamed ABDELLANI
2022-12-08 08:32:11 +01:00
parent 500c23ce27
commit d5c9c53d8b
2 changed files with 8 additions and 5 deletions

View File

@@ -1,3 +1,2 @@
Hub,Customer,Email,Phone,Producer,Product,Variant,Quantity,Item ($),Item + Fees ($),Admin & Handling ($),Ship ($),Pay fee ($),Total ($),Paid?,Shipping,Delivery?,Ship Street,Ship Street 2,Ship City,Ship Postcode,Ship State,Comments,SKU,Order Cycle,Payment Method,Customer Code,Tags,Billing Street,Billing Street 2,Billing City,Billing Postcode,Billing State,Order number,Date
Apple Market,John Doe,john@example.net,123-456-7890,Apple Farmer,Apples,"1g, S",1,10.0,10.0,"","","","",No,UPS Ground,Yes,10 Lovely Street,Northwest,Herndon,20170,Victoria,"",APP,"","",JHN,"",10 Lovely Street,Northwest,Herndon,20170,Victoria,R644360121,2022-05-26 00:00:00
Apple Market,John Doe,"","","","","",TOTAL,10.0,10.0,0,0.0,0,10.0,No,"","","","","","","","","","","","","","","","","","",R644360121,2022-05-26 00:00:00
Apple Market,John Doe,john@example.net,123-456-7890,Apple Farmer,Apples,"1g, S",1,10.0,10.0,"","","","",false,UPS Ground,true,10 Lovely Street,Northwest,Herndon,20170,Victoria,"",APP,,,JHN,"",10 Lovely Street,Northwest,Herndon,20170,Victoria,R644360121,2022-05-26 00:00:00
1 Hub Customer Email Phone Producer Product Variant Quantity Item ($) Item + Fees ($) Admin & Handling ($) Ship ($) Pay fee ($) Total ($) Paid? Shipping Delivery? Ship Street Ship Street 2 Ship City Ship Postcode Ship State Comments SKU Order Cycle Payment Method Customer Code Tags Billing Street Billing Street 2 Billing City Billing Postcode Billing State Order number Date
2 Apple Market John Doe john@example.net 123-456-7890 Apple Farmer Apples 1g, S 1 10.0 10.0 No false UPS Ground Yes true 10 Lovely Street Northwest Herndon 20170 Victoria APP JHN 10 Lovely Street Northwest Herndon 20170 Victoria R644360121 2022-05-26 00:00:00
Apple Market John Doe TOTAL 10.0 10.0 0 0.0 0 10.0 No R644360121 2022-05-26 00:00:00

View File

@@ -41,10 +41,14 @@ describe Reporting::Reports::OrdersAndFulfillment::OrderCycleCustomerTotals do
"spec/fixtures/reports/orders_and_fulfillment/order_cycle_customer_totals_report.csv"
end
it "generates the report" do
expect(report_table.length).to eq(2)
context 'csv format' do
let(:params) { { report_format: 'csv', display_summary_row: false, q: search_params } }
expect(report.render_as(:csv)).to eq comparison_report
it "generates the report" do
expect(report_table.length).to eq(1)
expect(report.render_as(:csv)).to eq comparison_report
end
end
it "has a line item row" do