Bugzilla – Attachment 75684 Details for
Bug 20837
CanItemBeReserved should follow ReservesControlBranch and not CircControl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20837: Unit tests
Bug-20837-Unit-tests.patch (text/plain), 1.70 KB, created by
Nick Clemens (kidclamp)
on 2018-05-30 17:31:58 UTC
(
hide
)
Description:
Bug 20837: Unit tests
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2018-05-30 17:31:58 UTC
Size:
1.70 KB
patch
obsolete
>From da0872e0378289f5c9503f94c4141ac70f5acb79 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 30 May 2018 17:29:57 +0000 >Subject: [PATCH] Bug 20837: Unit tests > >To test: >prove -v t/db_dependent/Holds.t >--- > t/db_dependent/Holds.t | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Holds.t b/t/db_dependent/Holds.t >index 1e6c234..d52c3f8 100755 >--- a/t/db_dependent/Holds.t >+++ b/t/db_dependent/Holds.t >@@ -7,7 +7,7 @@ use t::lib::TestBuilder; > > use C4::Context; > >-use Test::More tests => 55; >+use Test::More tests => 56; > use MARC::Record; > use C4::Biblio; > use C4::Items; >@@ -373,11 +373,16 @@ $dbh->do(q{ > is(CanItemBeReserved($borrowernumbers[0], $itemnumber), 'notReservable', > "CanItemBeReserved should return 'notReservable'"); > >+t::lib::Mocks::mock_preference( 'ReservesControlBranch', 'PatronLibrary' ); > ($item_bibnum, $item_bibitemnum, $itemnumber) = AddItem( > { homebranch => $branch_2, holdingbranch => $branch_1, itype => 'CAN' } , $bibnum); > is(CanItemBeReserved($borrowernumbers[0], $itemnumber), > 'cannotReserveFromOtherBranches', >- "CanItemBeReserved should return 'cannotReserveFromOtherBranches'"); >+ "CanItemBeReserved should use PatronLibrary rule when ReservesControlBranch set to 'PatronLibrary'"); >+t::lib::Mocks::mock_preference( 'ReservesControlBranch', 'ItemHomeLibrary' ); >+is(CanItemBeReserved($borrowernumbers[0], $itemnumber), >+ 'OK', >+ "CanItemBeReserved should use item home library rule when RsservesControlBranch set to 'ItemsHomeLibrary'"); > > ($item_bibnum, $item_bibitemnum, $itemnumber) = AddItem( > { homebranch => $branch_1, holdingbranch => $branch_1, itype => 'CAN' } , $bibnum); >-- >2.1.4
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 20837
:
75684
|
75685
|
87021
|
87022
|
87023
|
87024
|
87025
|
87409
|
87410
|
87673
|
87674
|
87675
|
88699
|
88700
|
88701