Bugzilla – Attachment 146830 Details for
Bug 32878
Make it impossible to renew the item if it has active item level hold
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32878: (QA follow-up) Unit test
Bug-32878-QA-follow-up-Unit-test.patch (text/plain), 1.86 KB, created by
Kyle M Hall (khall)
on 2023-02-17 11:47:08 UTC
(
hide
)
Description:
Bug 32878: (QA follow-up) Unit test
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2023-02-17 11:47:08 UTC
Size:
1.86 KB
patch
obsolete
>From e4bf0a4c9f6ef719d04ae97162befec9c5a6714c Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 16 Feb 2023 15:26:07 +0000 >Subject: [PATCH] Bug 32878: (QA follow-up) Unit test > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > t/db_dependent/Circulation.t | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index 2ecb44bec4..18e7ca271c 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -288,7 +288,7 @@ Koha::CirculationRules->set_rules( > ); > > subtest "CanBookBeRenewed AllowRenewalIfOtherItemsAvailable multiple borrowers and items tests" => sub { >- plan tests => 5; >+ plan tests => 7; > > #Can only reserve from home branch > Koha::CirculationRules->set_rule( >@@ -334,7 +334,7 @@ subtest "CanBookBeRenewed AllowRenewalIfOtherItemsAvailable multiple borrowers a > is (defined $issue->date_due(), 1, "Item 1 checked out, due date: " . $issue->date_due() ); > > # Biblio-level holds >- AddReserve( >+ my $reserve_1 = AddReserve( > { > branchcode => $patron_hold_1->branchcode, > borrowernumber => $patron_hold_1->borrowernumber, >@@ -370,6 +370,13 @@ subtest "CanBookBeRenewed AllowRenewalIfOtherItemsAvailable multiple borrowers a > is( $renewokay, 1, 'Can renew, two items available for two holds'); > is( $error, undef, 'Can renew, each reserve has an item'); > >+ # Item level hold >+ my $hold = Koha::Holds->find( $reserve_1 ); >+ $hold->itemnumber( $item_1->itemnumber )->store; >+ >+ ( $renewokay, $error ) = CanBookBeRenewed($patron_borrower->borrowernumber, $item_1->itemnumber); >+ is( $renewokay, 0, 'Cannot renew when there is an item specific hold'); >+ is( $error, 'on_reserve', 'Cannot renew, only this item can fill the reserve'); > > }; > >-- >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 32878
:
146145
|
146166
|
146740
|
146741
|
146742
|
146830
|
146833
|
146834
|
146835
|
148220
|
148223