You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(amount-factory): address second review — zero-discount guard, shouldNotReceive, order test
- Guard zero-discount in from_store_api_cart(): pass null instead of
Money(0.00) when discount_minor === 0, matching the from_wc_cart()
and from_wc_order() behaviour and fixing the assertNull test assertion.
- Replace shouldReceive('get_total') with shouldNotReceive() in
testFromWcCartTotalDerivesFromComponentsNotWcGetTotal so the test
actually enforces that get_total() is never called.
- Add testFromWcOrderTotalDerivesFromComponentsNotGetTotal() with the
same shouldNotReceive guard, covering the from_wc_order() rounding fix.
- Fix misleading 'never used for value' comment on total_price() mock.
0 commit comments