mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-02 21:57:17 +00:00
Add spec for report bug
This commit is contained in:
@@ -47,6 +47,7 @@ module OpenFoodNetwork
|
||||
|
||||
table = subject.table
|
||||
|
||||
expect(table.size).to eq 1
|
||||
expect(table[0]).to eq([
|
||||
order.reload.completed_at.strftime("%F %T"),
|
||||
order.id,
|
||||
@@ -70,6 +71,17 @@ module OpenFoodNetwork
|
||||
shipping_instructions
|
||||
])
|
||||
end
|
||||
|
||||
it "prints one row per line item" do
|
||||
pending "Each line item is shown multiple times when there is more than one item in the order"
|
||||
|
||||
create(:line_item_with_shipment, order: order)
|
||||
|
||||
subject = OrderAndDistributorReport.new(create(:admin_user), {}, true)
|
||||
|
||||
table = subject.table
|
||||
expect(table.size).to eq 2 # currently 4
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user