From 687da46854a5ef887e97363713d814c5750a6c1e Mon Sep 17 00:00:00 2001 From: Dan Wells Date: Tue, 18 Apr 2017 11:06:03 -0400 Subject: [PATCH] LP#1670407 Add tests for xact_finish close/re-open Since this bug came about due to negative balance changes (and it was easier), this commit extends the existing negative balances test suite to include basic tests for checking both xact_finish conditions. One of these tests fails without the fix from the previous commit. Signed-off-by: Dan Wells --- .../src/perlmods/live_t/09-lp1198465_neg_balances.t | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/live_t/09-lp1198465_neg_balances.t b/Open-ILS/src/perlmods/live_t/09-lp1198465_neg_balances.t index 3ee057624a..0190f28acd 100644 --- a/Open-ILS/src/perlmods/live_t/09-lp1198465_neg_balances.t +++ b/Open-ILS/src/perlmods/live_t/09-lp1198465_neg_balances.t @@ -1,6 +1,6 @@ #!perl -use Test::More tests => 127; +use Test::More tests => 129; diag("Test features of Conditional Negative Balances code."); @@ -531,6 +531,11 @@ is( 'Remaining balance of 0.00 after payment' ); +ok( + $summary->xact_finish ne '', + 'xact_finish is set due to 0.00 balance' +); + ### check-in the lost copy $item_req = $storage_ses->request('open-ils.storage.direct.asset.copy.retrieve', $item_id); @@ -576,6 +581,11 @@ is( 'Patron has a negative balance (credit) of 50.00 due to overpayment' ); +ok( + !defined($summary->xact_finish), + 'xact_finish is not set due to non-zero balance' +); + ############################## # 14. RERUN of Case 12. Test negative balance settings on fines -- 2.43.2