Bugzilla – Attachment 149292 Details for
Bug 33411
SIP2 includes other guarantees with the same guarantor when calculating against NoIssuesChargeGuarantees
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33411: Unit test update
Bug-33411-Unit-test-update.patch (text/plain), 2.06 KB, created by
David Nind
on 2023-04-07 20:42:11 UTC
(
hide
)
Description:
Bug 33411: Unit test update
Filename:
MIME Type:
Creator:
David Nind
Created:
2023-04-07 20:42:11 UTC
Size:
2.06 KB
patch
obsolete
>From e172c2b2454aa8ee7922185896a4e4c39825fdc8 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 7 Apr 2023 18:49:41 +0000 >Subject: [PATCH] Bug 33411: Unit test update > >Signed-off-by: David Nind <david@davidnind.com> >--- > t/db_dependent/SIP/Patron.t | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/SIP/Patron.t b/t/db_dependent/SIP/Patron.t >index 04baa9e7bc..23038174c7 100755 >--- a/t/db_dependent/SIP/Patron.t >+++ b/t/db_dependent/SIP/Patron.t >@@ -284,7 +284,9 @@ subtest "NoIssuesChargeGuarantees tests" => sub { > > my $patron = $builder->build_object({ class => 'Koha::Patrons' }); > my $child = $builder->build_object({ class => 'Koha::Patrons' }); >+ my $sibling = $builder->build_object({ class => 'Koha::Patrons' }); > $child->add_guarantor({ guarantor_id => $patron->borrowernumber, relationship => 'parent' }); >+ $sibling->add_guarantor({ guarantor_id => $patron->borrowernumber, relationship => 'parent' }); > > t::lib::Mocks::mock_preference('noissuescharge', 50); > t::lib::Mocks::mock_preference('NoIssuesChargeGuarantees', 11.01); >@@ -310,11 +312,21 @@ subtest "NoIssuesChargeGuarantees tests" => sub { > } > )->store; > >+ my $fee3 = $builder->build_object( >+ { >+ class => 'Koha::Account::Lines', >+ value => { >+ borrowernumber => $sibling->borrowernumber, >+ amountoutstanding => 11.11, >+ } >+ } >+ )->store; >+ > my $sip_patron = C4::SIP::ILS::Patron->new( $patron->cardnumber ); > > is( $sip_patron->fines_amount, 11, "Only patron's fines are reported in total"); > ok( !$sip_patron->charge_ok, "Guarantor blocked"); >- like( $sip_patron->screen_msg, qr/Patron blocked by fines \(11\.11\) on guaranteed accounts/,"Screen message includes related fines total"); >+ like( $sip_patron->screen_msg, qr/Patron blocked by fines \(22\.22\) on guaranteed accounts/,"Screen message includes related fines total"); > > $sip_patron = C4::SIP::ILS::Patron->new( $child->cardnumber ); > >-- >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 33411
:
149289
|
149290
|
149292
|
149293
|
151271
|
151272
|
151278
|
151279
|
151951
|
151970
|
151971
|
151972