Bugzilla – Attachment 147507 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.17 KB, created by
Tomás Cohen Arazi (tcohen)
on 2023-02-28 16:55:37 UTC
(
hide
)
Description:
Bug 33055: (bug 32624 follow-up) Unit tests
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2023-02-28 16:55:37 UTC
Size:
3.17 KB
patch
obsolete
>From c378e82f01fb3ec1d6f759ba05ff50d8a9f8803c 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 > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > 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 de3526df582..04baa9e7bc8 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.34.1
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