Bug 11338: (follow-up) take IndependentBranches into account for DelItemCheck() test

Fixes a test failure if the test database happens to have
IndependentBranches set to true.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit cea5f944a9)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
This commit is contained in:
Galen Charlton 2013-12-27 00:12:41 +00:00 committed by Fridolin SOMERS
parent 16df6d7504
commit c4ecc58fdb
1 changed files with 4 additions and 1 deletions

View File

@ -11,6 +11,7 @@ use C4::Biblio;
use C4::Items;
use C4::Members;
use C4::Circulation;
use t::lib::Mocks;
use Koha::DateUtils;
@ -271,10 +272,12 @@ is(exists $messages->{ResFound}?1:0, 1, 'AddReturn considers future reserve with
# test marking a hold as captured
ModReserveAffect($itemnumber, $requesters{'CPL'}, 0);
# avoiding the not_same_branch error
t::lib::Mocks::mock_preference('IndependentBranches', 0);
is(
DelItemCheck($dbh, $bibnum, $itemnumber),
'book_reserved',
'item that is capture to fill a hold cannot be deleted',
'item that is captured to fill a hold cannot be deleted',
);
my $letter = ReserveSlip('CPL', $requesters{'CPL'}, $bibnum);