Files
openfoodnetwork/spec/models/spree
Pau Perez 539c5d067a Update order payment_total when voiding a payment
As is, `payment_total` is only increased after successfully processing
a payment and never updated. This inconsistency breaks
`CustomerWithBalance` which relies on it.

Needless to say that if we keep this denormalized column, we better make
it consistent. I investigated current Spree's master branch (709e686cc0)
and they also realized it was broken. Now `Payment` runs the following
from the `after_save` `update_order` callback.

```rb
order.updater.update_payment_total if completed? || void?
```

I also took the chance to rearrange tests a bit.
2021-01-11 15:50:19 +01:00
..
2020-12-15 10:30:05 -08:00
2020-08-07 14:03:15 +01:00
2020-08-06 01:41:28 +01:00
2020-09-05 16:38:36 +01:00
2020-10-09 22:11:34 -05:00
2020-09-05 16:43:27 +01:00