Bugzilla – Attachment 24545 Details for
Bug 10452
AllowHoldsOnDamagedItems should control using damaged items to fulfill holds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 10452 [QA Followup] - Unit tests
PASSED-QA-Bug-10452-QA-Followup---Unit-tests.patch (text/plain), 1.89 KB, created by
Katrin Fischer
on 2014-01-18 14:38:34 UTC
(
hide
)
Description:
[PASSED QA] Bug 10452 [QA Followup] - Unit tests
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-01-18 14:38:34 UTC
Size:
1.89 KB
patch
obsolete
>From cf5c33077e331dcd7a2f29a4373feca0a8e7c74a Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 17 Jan 2014 09:05:40 -0500 >Subject: [PATCH] [PASSED QA] Bug 10452 [QA Followup] - Unit tests > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Passes all tests and QA script. Also checked > t/db_dependent/Holds.t > t/db_dependent/HoldsQueue.t > >Tested holds triggering with different settings of >AllowHoldsOnDamagedItems. Works as described. >--- > t/db_dependent/Holds.t | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Holds.t b/t/db_dependent/Holds.t >index 2c28c07..2e0d278 100755 >--- a/t/db_dependent/Holds.t >+++ b/t/db_dependent/Holds.t >@@ -6,7 +6,7 @@ use t::lib::Mocks; > use C4::Context; > use C4::Branch; > >-use Test::More tests => 25; >+use Test::More tests => 29; > use MARC::Record; > use C4::Biblio; > use C4::Items; >@@ -278,6 +278,14 @@ ModReserve({ reserve_id => $reserveid2, rank => 'del' }); > $reserve3 = GetReserve( $reserveid3 ); > is( $reserve3->{priority}, 1, "After ModReserve, the 3rd reserve becomes the first on the waiting list" ); > >+ModItem({ damaged => 1 }, $item_bibnum, $itemnumber); >+C4::Context->set_preference( 'AllowHoldsOnDamagedItems', 1 ); >+ok( CanItemBeReserved( $borrowernumbers[0], $itemnumber), "Patron can reserve damaged item with AllowHoldsOnDamagedItems enabled" ); >+ok( defined( ( CheckReserves($itemnumber) )[1] ), "Hold can be trapped for damaged item with AllowHoldsOnDamagedItems enabled" ); >+C4::Context->set_preference( 'AllowHoldsOnDamagedItems', 0 ); >+ok( !CanItemBeReserved( $borrowernumbers[0], $itemnumber), "Patron cannot reserve damaged item with AllowHoldsOnDamagedItems disabled" ); >+ok( !defined( ( CheckReserves($itemnumber) )[1] ), "Hold cannot be trapped for damaged item with AllowHoldsOnDamagedItems disabled" ); >+ > > # Helper method to set up a Biblio. > sub create_helper_biblio { >-- >1.8.3.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 10452
:
18899
|
19784
|
24498
|
24499
|
24544
| 24545