Bugzilla – Attachment 24498 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]
Bug 10452 [QA Followup] - Unit tests
Bug-10452-QA-Followup---Unit-tests.patch (text/plain), 1.62 KB, created by
Kyle M Hall (khall)
on 2014-01-17 14:06:07 UTC
(
hide
)
Description:
Bug 10452 [QA Followup] - Unit tests
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-01-17 14:06:07 UTC
Size:
1.62 KB
patch
obsolete
>From f018d99c5ff8a88b01dd36009d8f4a0d039f73ce 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] Bug 10452 [QA Followup] - Unit tests > >--- > t/db_dependent/Holds.t | 10 +++++++++- > 1 files changed, 9 insertions(+), 1 deletions(-) > >diff --git a/t/db_dependent/Holds.t b/t/db_dependent/Holds.t >index 2c28c07..c237d16 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 can be trapped for damaged item with AllowHoldsOnDamagedItems enabled" ); >+ > > # Helper method to set up a Biblio. > sub create_helper_biblio { >-- >1.7.2.5
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