Bugzilla – Attachment 95644 Details for
Bug 23964
An item level hold when placed is set to Waiting, if ReservesNeedReturn is set to Automatic
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23964: 3 more tests to cover found and match the description
Bug-23964-3-more-tests-to-cover-found-and-match-th.patch (text/plain), 2.62 KB, created by
Marcel de Rooy
on 2019-11-21 06:55:35 UTC
(
hide
)
Description:
Bug 23964: 3 more tests to cover found and match the description
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2019-11-21 06:55:35 UTC
Size:
2.62 KB
patch
obsolete
>From de5d7c5a6131583cb433ac38802cdc55b7157015 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 20 Nov 2019 10:04:40 +0100 >Subject: [PATCH] Bug 23964: 3 more tests to cover found and match the > description >Content-Type: text/plain; charset=utf-8 > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/db_dependent/Reserves.t | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/Reserves.t b/t/db_dependent/Reserves.t >index 84fefb7cbc..36149668ed 100755 >--- a/t/db_dependent/Reserves.t >+++ b/t/db_dependent/Reserves.t >@@ -672,7 +672,7 @@ subtest '_koha_notify_reserve() tests' => sub { > }; > > subtest 'ReservesNeedReturns' => sub { >- plan tests => 11; >+ plan tests => 13; > > my $library = $builder->build_object( { class => 'Koha::Libraries' } ); > my $item_info = { >@@ -720,10 +720,11 @@ subtest 'ReservesNeedReturns' => sub { > t::lib::Mocks::mock_preference('AllowHoldsOnDamagedItems', 1); # '0' means damaged holds not allowed > $hold = place_item_hold( $patron, $item, $library, $priority ); > is( $hold->priority, 0, 'If ReservesNeedReturns is 0 and damaged holds allowed, priority must have been set to 0' ); >- is( $hold->found, 'W', 'If ReservesNeedReturns is 0 and damaged holds allowed, found must have been set waiting' ); >+ is( $hold->found, 'W', 'If ReservesNeedReturns is 0 and damaged holds allowed, found must have been set waiting' ); > $hold->delete; > > my $hold_1 = place_item_hold( $patron, $item, $library, $priority ); >+ is( $hold_1->found, 'W', 'First hold on item is set to waiting with ReservesNeedReturns set to 0' ); > is( $hold_1->priority, 0, 'First hold on item is set to waiting with ReservesNeedReturns set to 0' ); > $hold = place_item_hold( $patron_2, $item, $library, $priority ); > is( $hold->priority, 1, 'If ReservesNeedReturns is 0 but item already on hold priority must be set to 1' ); >@@ -736,7 +737,8 @@ subtest 'ReservesNeedReturns' => sub { > } }); > $item->damaged(0)->store; > $hold = place_item_hold( $patron, $item, $library, $priority ); >- is( $hold->priority, 1, 'If ReservesNeedReturns is 0 but item in transit the hold must not be set to waiting' ); >+ is( $hold->found, undef, 'If ReservesNeedReturns is 0 but item in transit the hold must not be set to waiting' ); >+ is( $hold->priority, 1, 'If ReservesNeedReturns is 0 but item in transit the hold must not be set to waiting' ); > > t::lib::Mocks::mock_preference('ReservesNeedReturns', 1); # Don't affect other tests > }; >-- >2.11.0
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 23964
:
95016
|
95017
|
95021
|
95022
|
95111
|
95249
|
95544
|
95594
|
95595
|
95596
|
95597
|
95598
|
95599
|
95639
|
95640
|
95641
|
95642
|
95643
| 95644 |
95780
|
95781