Bugzilla – Attachment 137728 Details for
Bug 14784
Missing checkin message for debarred patrons when issuing rules 'fine days = 0'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14784: (follow-up) Unit tests
Bug-14784-follow-up-Unit-tests.patch (text/plain), 2.57 KB, created by
Shi Yao Wang
on 2022-07-14 14:48:27 UTC
(
hide
)
Description:
Bug 14784: (follow-up) Unit tests
Filename:
MIME Type:
Creator:
Shi Yao Wang
Created:
2022-07-14 14:48:27 UTC
Size:
2.57 KB
patch
obsolete
>From 63e6f07394e6739cd5d5cd294475eb302e63faf9 Mon Sep 17 00:00:00 2001 >From: Shi Yao Wang <shi-yao.wang@inlibro.com> >Date: Thu, 14 Jul 2022 10:41:27 -0400 >Subject: [PATCH] Bug 14784: (follow-up) Unit tests > >--- > t/db_dependent/Circulation.t | 43 +++++++++++++++++++++++++++++++++++- > 1 file changed, 42 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index 84444a3bd0..c6b9fec85c 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -2598,7 +2598,7 @@ subtest 'AddReturn + CumulativeRestrictionPeriods' => sub { > }; > > subtest 'AddReturn + suspension_chargeperiod' => sub { >- plan tests => 27; >+ plan tests => 29; > > my $library = $builder->build( { source => 'Branch' } ); > my $patron = $builder->build( { source => 'Borrower', value => { categorycode => $patron_category->{categorycode} } } ); >@@ -2828,6 +2828,47 @@ subtest 'AddReturn + suspension_chargeperiod' => sub { > } > ); > >+ Koha::CirculationRules->search->delete; >+ Koha::CirculationRules->set_rules( >+ { >+ categorycode => undef, >+ itemtype => undef, >+ branchcode => undef, >+ rules => { >+ finedays => 0, >+ } >+ } >+ ); >+ >+ Koha::Patron::Debarments::AddDebarment( >+ { >+ borrowernumber => $patron->{borrowernumber}, >+ expiration => '9999-12-31', >+ type => 'MANUAL', >+ } >+ ); >+ >+ AddIssue( $patron, $item_1->barcode, $now->clone->subtract( days => 1 ) ); >+ my ( undef, $message ) = AddReturn( $item_1->barcode, $library->{branchcode}, undef, $now ); >+ is( $message->{WasReturned} && exists $message->{ForeverDebarred}, 1, 'Forever debarred message for Addreturn when overdue'); >+ >+ Koha::Patron::Debarments::DelUniqueDebarment( >+ { >+ borrowernumber => $patron->{borrowernumber}, >+ type => 'MANUAL', >+ } >+ ); >+ Koha::Patron::Debarments::AddDebarment( >+ { >+ borrowernumber => $patron->{borrowernumber}, >+ expiration => $now->clone->add( days => 10 ), >+ type => 'MANUAL', >+ } >+ ); >+ >+ AddIssue( $patron, $item_1->barcode, $now->clone->subtract( days => 1 ) ); >+ (undef, $message) = AddReturn( $item_1->barcode, $library->{branchcode}, undef, $now ); >+ is( $message->{WasReturned} && exists $message->{PrevDebarred}, 1, 'Previously debarred message for Addreturn when overdue'); > }; > > subtest 'CanBookBeIssued + AutoReturnCheckedOutItems' => sub { >-- >2.25.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 14784
:
42354
|
49282
|
49283
|
49377
|
58227
|
67102
|
68132
|
69295
|
69296
|
77683
|
79826
|
106808
|
106809
|
107487
|
110485
|
110514
|
110763
|
110764
|
112724
|
112725
|
136040
|
136327
|
137727
|
137728
|
145320
|
145321