Bugzilla – Attachment 171483 Details for
Bug 37774
Title level hold should fill even if specific item is not holdable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37774: Unit tests
Bug-37774-Unit-tests.patch (text/plain), 2.55 KB, created by
Brendan Lawlor
on 2024-09-13 15:36:31 UTC
(
hide
)
Description:
Bug 37774: Unit tests
Filename:
MIME Type:
Creator:
Brendan Lawlor
Created:
2024-09-13 15:36:31 UTC
Size:
2.55 KB
patch
obsolete
>From 1cec5f1f616b3125882a67663af8884df6fbc8ba Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 30 Aug 2024 11:34:36 +0000 >Subject: [PATCH] Bug 37774: Unit tests > >Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> >--- > t/db_dependent/Reserves.t | 37 +++++++++++++++++++++++++++++++++++-- > 1 file changed, 35 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Reserves.t b/t/db_dependent/Reserves.t >index 14fb88d5cb..7ada7fd4df 100755 >--- a/t/db_dependent/Reserves.t >+++ b/t/db_dependent/Reserves.t >@@ -1082,9 +1082,9 @@ subtest 'reserves.item_level_hold' => sub { > > }; > >-subtest 'MoveReserve additional test' => sub { >+subtest 'MoveReserve additional tests' => sub { > >- plan tests => 4; >+ plan tests => 8; > > # Create the items and patrons we need > my $biblio = $builder->build_sample_biblio(); >@@ -1124,6 +1124,39 @@ subtest 'MoveReserve additional test' => sub { > is($patron_2->holds->count, 0, "The 2nd patrons no longer has a hold"); > is($patron_2->old_holds->next()->reserve_id, $reserve_2, "The 2nd patrons hold was filled and moved to old holds"); > >+ # Confirm that if a patron has a hold on an item that violates hold policies the hold is still filled when issuing the item >+ Koha::CirculationRules->set_rule( >+ { >+ branchcode => undef, >+ itemtype => $itype->itemtype, >+ rule_name => 'holdallowed', >+ rule_value => 'not_allowed' >+ } >+ ); >+ MoveReserve( $item_1->itemnumber, $patron_1->borrowernumber ); >+ is( $patron_1->holds->count, 0, "The 1st patron no longer has a hold" ); >+ is( >+ $patron_1->old_holds->next()->reserve_id, $reserve_1, >+ "The 1st patrons hold was filled and moved to old holds even when item not holdable" >+ ); >+ >+ # Confirm that if a patron has a hold on a title and is issued an item that violates hold policies the hold is still filled >+ my $reserve_3 = AddReserve( >+ { >+ branchcode => $item_1->homebranch, >+ borrowernumber => $patron_1->borrowernumber, >+ biblionumber => $biblio->biblionumber, >+ priority => 1, >+ itemnumber => undef, >+ } >+ ); >+ MoveReserve( $item_1->itemnumber, $patron_1->borrowernumber ); >+ is( $patron_1->holds->count, 0, "The 1st patron no longer has a hold" ); >+ is( >+ $patron_1->old_holds->next()->reserve_id, $reserve_1, >+ "The 1st patrons hold was filled and moved to old holds even when item not holdable" >+ ); >+ > }; > > subtest 'RevertWaitingStatus' => sub { >-- >2.39.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 37774
:
170906
|
170907
| 171483 |
171484