Bugzilla – Attachment 147258 Details for
Bug 33055
SIP2 adding incorrect fines blocked message
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33055: (bug 32624 follow-up) Unit tests
Bug-33055-bug-32624-follow-up-Unit-tests.patch (text/plain), 3.05 KB, created by
Nick Clemens (kidclamp)
on 2023-02-23 15:35:49 UTC
(
hide
)
Description:
Bug 33055: (bug 32624 follow-up) Unit tests
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-02-23 15:35:49 UTC
Size:
3.05 KB
patch
obsolete
>From 610a41df6a81699499fb3250ca0ca244ca9d5166 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 23 Feb 2023 15:32:21 +0000 >Subject: [PATCH] Bug 33055: (bug 32624 follow-up) Unit tests > >--- > t/db_dependent/SIP/Patron.t | 23 +++++++++++++++++++---- > 1 file changed, 19 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/SIP/Patron.t b/t/db_dependent/SIP/Patron.t >index de3526df58..04baa9e7bc 100755 >--- a/t/db_dependent/SIP/Patron.t >+++ b/t/db_dependent/SIP/Patron.t >@@ -276,7 +276,7 @@ $schema->storage->txn_rollback; > > subtest "NoIssuesChargeGuarantees tests" => sub { > >- plan tests => 5; >+ plan tests => 6; > > t::lib::Mocks::mock_preference( 'borrowerRelationship', 'parent' ); > >@@ -320,13 +320,14 @@ subtest "NoIssuesChargeGuarantees tests" => sub { > > is( $sip_patron->fines_amount, 0.11,"Guarantee only fines correctly counted"); > ok( $sip_patron->charge_ok, "Guarantee not blocked by guarantor fines"); >+ unlike( $sip_patron->screen_msg, qr/Patron blocked by fines .* on guaranteed accounts/,"Screen message does not include blocked message"); > > $schema->storage->txn_rollback; > }; > > subtest "NoIssuesChargeGuarantorsWithGuarantees tests" => sub { > >- plan tests => 6; >+ plan tests => 12; > > t::lib::Mocks::mock_preference( 'borrowerRelationship', 'parent' ); > >@@ -361,15 +362,29 @@ subtest "NoIssuesChargeGuarantorsWithGuarantees tests" => sub { > > my $sip_patron = C4::SIP::ILS::Patron->new( $patron->cardnumber ); > >- is( $sip_patron->fines_amount, 11, "Guarantee fines correctly included"); >+ is( $sip_patron->fines_amount, 11, "Personal fines correctly reported"); > ok( !$sip_patron->charge_ok, "Guarantor blocked"); > like( $sip_patron->screen_msg, qr/Patron blocked by fines \(11\.11\) on related accounts/,"Screen message includes related fines total"); > > $sip_patron = C4::SIP::ILS::Patron->new( $child->cardnumber ); > >- is( $sip_patron->fines_amount, 0.11, "Guarantor fines correctly included"); >+ is( $sip_patron->fines_amount, 0.11, "Personal fines correctly reported"); > ok( !$sip_patron->charge_ok, "Guarantee blocked"); > like( $sip_patron->screen_msg, qr/Patron blocked by fines \(11\.11\) on related accounts/,"Screen message includes related fines total"); > >+ t::lib::Mocks::mock_preference('NoIssuesChargeGuarantorsWithGuarantees', 12.01); >+ >+ $sip_patron = C4::SIP::ILS::Patron->new( $child->cardnumber ); >+ >+ is( $sip_patron->fines_amount, 0.11, "Personal fines correctly reported"); >+ ok( $sip_patron->charge_ok, "Guarantee not blocked"); >+ unlike( $sip_patron->screen_msg, qr/Patron blocked by fines .* on related accounts/,"Screen message does not indicate block"); >+ >+ $sip_patron = C4::SIP::ILS::Patron->new( $patron->cardnumber ); >+ >+ is( $sip_patron->fines_amount, 11, "Personal fines correctly reported"); >+ ok( $sip_patron->charge_ok, "Patron not blocked"); >+ unlike( $sip_patron->screen_msg, qr/Patron blocked by fines .* on related accounts/,"Screen message does not indicate block"); >+ > $schema->storage->txn_rollback; > }; >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33055
:
147258
|
147259
|
147330
|
147331
|
147507
|
147508