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>
This commit is contained in:
Galen Charlton 2013-12-27 00:12:41 +00:00
parent 28d97e3228
commit cea5f944a9

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);