mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-03 22:06:07 +00:00
test if OCST report includes variant's sku
This commit is contained in:
@@ -18,6 +18,10 @@ module Reporting
|
||||
OrderCycleSupplierTotals.new(current_user, params)
|
||||
end
|
||||
|
||||
let(:table_headers) do
|
||||
report.table_headers
|
||||
end
|
||||
|
||||
let(:report_table) do
|
||||
report.table_rows
|
||||
end
|
||||
@@ -31,6 +35,15 @@ module Reporting
|
||||
supplier_name_field = report_table.first[0]
|
||||
expect(supplier_name_field).to eq supplier.name
|
||||
end
|
||||
|
||||
it "includes sku column" do
|
||||
variant_sku = order.line_items.first.variant.sku
|
||||
last_column_title = table_headers.last
|
||||
first_row_last_column_value = report_table.first.last
|
||||
|
||||
expect(last_column_title).to eq "SKU"
|
||||
expect(first_row_last_column_value).to eq variant_sku
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user