Bug 21727: Unit tests for the refund case
authorTomas Cohen Arazi <tomascohen@theke.io>
Wed, 12 Dec 2018 13:49:18 +0000 (10:49 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 11 Jan 2019 12:19:01 +0000 (12:19 +0000)
commit5994296aad5368440c1d901f42fdf3a1b50d62b9
tree64c65477782c79a86b596517a38ea5bb7b142b66
parent648808a33f6d482f082530526d2a8776dd88f5bd
Bug 21727: Unit tests for the refund case

This patch introduces tests for the behaviour when the negative adjust
exceedes the amount that was already paid. In this case, the line amount
is expected to be set to 0, and a credit with the payed amount created.

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Account/Lines.t
=> SUCCESS: tests pass!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
t/db_dependent/Koha/Account/Lines.t