mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Format date in summary row as it's formatted in a row
for order cycle customer totals report + update specs
This commit is contained in:
@@ -126,7 +126,7 @@ module Reporting
|
||||
order_cycle: order.order_cycle&.name,
|
||||
payment_method: order.payments.first&.payment_method&.name,
|
||||
order_number: order.number,
|
||||
date: order.completed_at,
|
||||
date: order.completed_at.strftime("%F %T"),
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
@@ -38,6 +38,11 @@ module Reporting
|
||||
expect(report.rows.first.order_number).to eq order.number
|
||||
expect(report.rows.first.date).to eq order.completed_at.strftime("%F %T")
|
||||
end
|
||||
|
||||
it 'includes the summary row' do
|
||||
expect(report.rows.second.quantity).to eq "TOTAL"
|
||||
expect(report.rows.second.date).to eq order.completed_at.strftime("%F %T")
|
||||
end
|
||||
end
|
||||
|
||||
context "loading shipping methods" do
|
||||
|
||||
Reference in New Issue
Block a user