Bugzilla – Attachment 78487 Details for
Bug 7534
Add an option on library level to indicate if a library can be chosen as pick-up location
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7534: (RM follow-up) Fix tests and adjust after bug 15524
Bug-7534-RM-follow-up-Fix-tests-and-adjust-after-b.patch (text/plain), 2.81 KB, created by
Kyle M Hall (khall)
on 2018-09-06 13:47:25 UTC
(
hide
)
Description:
Bug 7534: (RM follow-up) Fix tests and adjust after bug 15524
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2018-09-06 13:47:25 UTC
Size:
2.81 KB
patch
obsolete
>From 11c468195611e790b76b65b2d1b46e301ee67a93 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Sat, 25 Aug 2018 19:06:21 +0000 >Subject: [PATCH] Bug 7534: (RM follow-up) Fix tests and adjust after bug 15524 > >--- > C4/Reserves.pm | 2 +- > t/db_dependent/Holds.t | 15 +++++++++++---- > 2 files changed, 12 insertions(+), 5 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index e8d3a10143..213c7c376d 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -285,7 +285,7 @@ sub CanBookBeReserved{ > my $canReserve; > foreach my $itemnumber (@itemnumbers) { > $canReserve = CanItemBeReserved( $borrowernumber, $itemnumber, $pickup_branchcode ); >- return $canReserve if $canReserve->{status} eq 'OK'; >+ return { status => 'OK' } if $canReserve->{status} eq 'OK'; > } > return $canReserve; > } >diff --git a/t/db_dependent/Holds.t b/t/db_dependent/Holds.t >index 9361c85eaf..31a96a9dac 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 Koha::Patrons; > use C4::Items; >@@ -487,6 +487,13 @@ subtest 'Pickup location availability tests' => sub { > my ( $bibnum, $title, $bibitemnum ) = create_helper_biblio('ONLY1'); > my ( $item_bibnum, $item_bibitemnum, $itemnumber ) > = AddItem( { homebranch => $branch_1, holdingbranch => $branch_1 }, $bibnum ); >+ #Add a default rule to allow some holds >+ $dbh->do( >+ q{INSERT INTO issuingrules (categorycode, branchcode, itemtype, reservesallowed, holds_per_record) >+ VALUES (?, ?, ?, ?, ?)}, >+ {}, >+ '*', '*', '*', 25, 99 >+ ); > my $item = Koha::Items->find($itemnumber); > my $branch_to = $builder->build({ source => 'Branch' })->{ branchcode }; > my $library = Koha::Libraries->find($branch_to); >@@ -495,12 +502,12 @@ subtest 'Pickup location availability tests' => sub { > t::lib::Mocks::mock_preference('UseBranchTransferLimits', 1); > t::lib::Mocks::mock_preference('BranchTransferLimitsType', 'itemtype'); > $library->pickup_location('1')->store; >- is(CanItemBeReserved($patron, $item->itemnumber, $branch_to), >+ is(CanItemBeReserved($patron, $item->itemnumber, $branch_to)->{status}, > 'OK', 'Library is a pickup location'); > $library->pickup_location('0')->store; >- is(CanItemBeReserved($patron, $item->itemnumber, $branch_to), >+ is(CanItemBeReserved($patron, $item->itemnumber, $branch_to)->{status}, > 'libraryNotPickupLocation', 'Library is not a pickup location'); >- is(CanItemBeReserved($patron, $item->itemnumber, 'nonexistent'), >+ is(CanItemBeReserved($patron, $item->itemnumber, 'nonexistent')->{status}, > 'libraryNotFound', 'Cannot set unknown library as pickup location'); > }; > >-- >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 7534
:
60014
|
60015
|
60016
|
60017
|
60018
|
60022
|
60023
|
60781
|
60794
|
60795
|
60796
|
60797
|
60798
|
60799
|
60878
|
60879
|
60880
|
60881
|
60882
|
60883
|
61044
|
61045
|
61046
|
61047
|
61273
|
61274
|
61275
|
61276
|
61277
|
61278
|
61279
|
61280
|
77847
|
77848
|
77849
|
77850
|
77851
|
77852
|
77853
|
77854
|
77855
|
77856
|
78160
|
78161
|
78162
|
78163
|
78164
|
78165
|
78166
|
78167
|
78168
|
78169
|
78170
|
78171
|
78477
|
78478
|
78479
|
78480
|
78481
|
78482
|
78483
|
78484
|
78485
|
78486
| 78487 |
78488
|
78489
|
78495
|
78540
|
78548
|
84852