From fb9da376f360e209122e89faac54a6b4c500f585 Mon Sep 17 00:00:00 2001 From: Agustin Moyano Date: Tue, 23 Apr 2019 16:18:59 -0300 Subject: [PATCH] Bug 22284: (follow-up) Remove commented warn and address test failures Signed-off-by: Tomas Cohen Arazi --- Koha/Item.pm | 2 -- t/db_dependent/Holds.t | 10 ++++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Koha/Item.pm b/Koha/Item.pm index 24b6940340..613029588c 100644 --- a/Koha/Item.pm +++ b/Koha/Item.pm @@ -302,8 +302,6 @@ sub pickup_locations { my $branch_control = C4::Context->preference('HomeOrHoldingBranch'); my $library = $branch_control eq 'holdingbranch' ? $self->holding_branch : $self->home_branch; - #warn $branch_control.' '.$branchitemrule->{holdallowed}.' '.$library->branchcode.' '.$patron->branchcode; - my @libs; if(defined $patron) { return @libs if $branchitemrule->{holdallowed} == 3 && !$library->validate_hold_sibling( {branchcode => $patron->branchcode} ); diff --git a/t/db_dependent/Holds.t b/t/db_dependent/Holds.t index 92f38c36cf..f4b2803509 100755 --- a/t/db_dependent/Holds.t +++ b/t/db_dependent/Holds.t @@ -244,7 +244,12 @@ is( $hold->priority, '6', "Test AlterPriority(), move to bottom" ); my $foreign_biblio = $builder->build_sample_biblio({ itemtype => 'DUMMY' }); my ($foreign_item_bibnum, $foreign_item_bibitemnum, $foreign_itemnumber) = AddItem({ homebranch => $branch_2, holdingbranch => $branch_2 } , $foreign_biblio->biblionumber); +# Cleanup circulation rules $dbh->do('DELETE FROM issuingrules'); +$dbh->do('DELETE FROM branch_item_rules'); +$dbh->do('DELETE FROM default_branch_item_rules'); +$dbh->do('DELETE FROM default_branch_circ_rules'); +$dbh->do('DELETE FROM default_circ_rules'); $dbh->do( q{INSERT INTO issuingrules (categorycode, branchcode, itemtype, reservesallowed, holds_per_record) VALUES (?, ?, ?, ?, ?)}, @@ -565,6 +570,11 @@ subtest 'CanItemBeReserved / holds_per_day tests' => sub { Koha::Holds->search->delete; $dbh->do('DELETE FROM issues'); + $dbh->do('DELETE FROM issuingrules'); + $dbh->do('DELETE FROM branch_item_rules'); + $dbh->do('DELETE FROM default_branch_item_rules'); + $dbh->do('DELETE FROM default_branch_circ_rules'); + $dbh->do('DELETE FROM default_circ_rules'); Koha::Items->search->delete; Koha::Biblios->search->delete; -- 2.11.0