Bugzilla – Attachment 117855 Details for
Bug 27058
Cannot place hold to ordered item when on shelf holds are not allowed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27058: Add test for IsAvailableForItemLevelRequest and notforloan
Bug-27058-Add-test-for-IsAvailableForItemLevelRequ.patch (text/plain), 2.06 KB, created by
Jonathan Druart
on 2021-03-05 13:49:36 UTC
(
hide
)
Description:
Bug 27058: Add test for IsAvailableForItemLevelRequest and notforloan
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-03-05 13:49:36 UTC
Size:
2.06 KB
patch
obsolete
>From 818cb5dbbf8a07ccf4c972995fbc37f90b5c469b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 5 Mar 2021 14:49:22 +0100 >Subject: [PATCH] Bug 27058: Add test for IsAvailableForItemLevelRequest and > notforloan > >--- > .../Holds/DisallowHoldIfItemsAvailable.t | 35 ++++++++++++++++++- > 1 file changed, 34 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t b/t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t >index 13600eb871..8fd6b2cb1b 100755 >--- a/t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t >+++ b/t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t >@@ -8,7 +8,7 @@ use C4::Items; > use Koha::Items; > use Koha::CirculationRules; > >-use Test::More tests => 12; >+use Test::More tests => 13; > > use t::lib::TestBuilder; > use t::lib::Mocks; >@@ -424,6 +424,39 @@ subtest 'Check item checkout availability with ordered item' => sub { > is( $is, 0, "Ordered item cannot be checked out" ); > }; > >+subtest 'Check item availability for hold with ordered item' => sub { >+ plan tests => 1; >+ >+ my $biblio2 = $builder->build_sample_biblio( { itemtype => $itemtype } ); >+ my $item1 = $builder->build_sample_item( >+ { biblionumber => $biblio2->biblionumber, >+ itype => $itemtype2, >+ homebranch => $library_A, >+ holdingbranch => $library_A, >+ notforloan => -1 >+ } >+ ); >+ >+ $dbh->do("DELETE FROM circulation_rules"); >+ Koha::CirculationRules->set_rules( >+ { categorycode => undef, >+ itemtype => $itemtype2, >+ branchcode => undef, >+ rules => { >+ issuelength => 7, >+ lengthunit => 8, >+ reservesallowed => 99, >+ holds_per_record => 99, >+ onshelfholds => 2, >+ } >+ } >+ ); >+ >+ $is = IsAvailableForItemLevelRequest( $item1, $patron1 ); >+ is( $is, 1, "Ordered items are available for hold" ); >+}; >+ >+ > # Cleanup > $schema->storage->txn_rollback; > >-- >2.20.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 27058
:
113820
|
113821
|
113822
|
113824
|
113825
|
114203
|
114204
|
114210
|
114211
|
117021
|
117780
|
117781
|
117782
|
117855
|
117864
|
117865