Bugzilla – Attachment 87021 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.79 KB, created by
Nick Clemens (kidclamp)
on 2019-03-26 14:52:15 UTC
(
hide
)
Description:
Bug 20837: Unit tests
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2019-03-26 14:52:15 UTC
Size:
1.79 KB
patch
obsolete
>From 5b3f4148d6e8a07597db733095256239f98b5656 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 7af21266ce..9cac37071c 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 => 57; >+use Test::More tests => 58; > use MARC::Record; > > use C4::Biblio; >@@ -375,11 +375,16 @@ $biblio = $builder->build_sample_biblio({ itemtype => 'CANNOT' }); > is(CanItemBeReserved($borrowernumbers[0], $itemnumber)->{status}, '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' } , $biblio->biblionumber); > is(CanItemBeReserved($borrowernumbers[0], $itemnumber)->{status}, > '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' } , $biblio->biblionumber); >-- >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 20837
:
75684
|
75685
|
87021
|
87022
|
87023
|
87024
|
87025
|
87409
|
87410
|
87673
|
87674
|
87675
|
88699
|
88700
|
88701