Bugzilla – Attachment 157090 Details for
Bug 30556
OPAC shows "Place hold" button on available items even if on shelf holds aren't allowed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30556: (follow-up) Unit tests
Bug-30556-follow-up-Unit-tests.patch (text/plain), 2.00 KB, created by
Emily-Rose Francoeur
on 2023-10-13 13:36:48 UTC
(
hide
)
Description:
Bug 30556: (follow-up) Unit tests
Filename:
MIME Type:
Creator:
Emily-Rose Francoeur
Created:
2023-10-13 13:36:48 UTC
Size:
2.00 KB
patch
obsolete
>From c37b54fbb8e1becd5f6c4441c8643eb731086eb2 Mon Sep 17 00:00:00 2001 >From: Shi Yao Wang <shi-yao.wang@inlibro.com> >Date: Mon, 4 Jul 2022 09:49:54 -0400 >Subject: [PATCH] Bug 30556: (follow-up) Unit tests > >Signed-off-by: David Nind <david@davidnind.com> >--- > t/db_dependent/Reserves.t | 22 ++++++++-------------- > 1 file changed, 8 insertions(+), 14 deletions(-) > >diff --git a/t/db_dependent/Reserves.t b/t/db_dependent/Reserves.t >index c329222a54..5e4308a4fd 100755 >--- a/t/db_dependent/Reserves.t >+++ b/t/db_dependent/Reserves.t >@@ -1468,21 +1468,11 @@ subtest 'IsAvailableForItemLevelRequest() tests' => sub { > "Item not available for item-level hold because no effective item type" > ); > >- Koha::CirculationRules->set_rules( >- { >- categorycode => '*', >- itemtype => '*', >- branchcode => '*', >- rules => { >- onshelfholds => 0, >- } >- } >- ); >- my $item_1 = $builder->build_sample_item( { notforloan => -1 } ); > ok( >- C4::Reserves::IsAvailableForItemLevelRequest( $item_1, $patron ), >- "We can placing hold on item with negative not for loan values when 'On shelf holds allowed' is set to 'If any unavailable'" >+ !C4::Reserves::IsAvailableForItemLevelRequest( $item, undef ), >+ "Item not available for item-level hold because no patron defined" > ); >+ > $schema->storage->txn_rollback; > }; > >@@ -1590,7 +1580,7 @@ subtest 'AlterPriorty() tests' => sub { > > subtest 'CanBookBeReserved() tests' => sub { > >- plan tests => 2; >+ plan tests => 3; > > $schema->storage->txn_begin; > >@@ -1661,6 +1651,10 @@ subtest 'CanBookBeReserved() tests' => sub { > { itemtype => $itype->id } ); > is_deeply( $res, { status => '' }, 'Holds on itemtype limit reached' ); > >+ $res = CanBookBeReserved( undef, $biblio->id, $library->id, >+ { itemtype => $itype->id } ); >+ is_deeply( $res, { status => '' }, 'Patron id undefined' ); >+ > $schema->storage->txn_rollback; > }; > >-- >2.34.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 30556
:
133497
|
133608
|
134172
|
134420
|
134421
|
134436
|
134437
|
134438
|
134617
|
134619
|
134620
|
134621
|
135395
|
137065
|
139289
|
139290
|
139291
|
139292
|
144429
|
147378
|
147379
|
147380
|
147381
|
147382
|
147441
|
147442
|
150218
|
150219
|
150220
|
150221
|
150222
|
156188
|
156189
|
156190
|
156191
|
156192
|
156429
|
157087
|
157088
|
157089
| 157090 |
157091