diff --git a/t/db_dependent/Circulation/Branch.t b/t/db_dependent/Circulation/Branch.t index 9a040d1076..2b92b2fdb8 100644 --- a/t/db_dependent/Circulation/Branch.t +++ b/t/db_dependent/Circulation/Branch.t @@ -46,6 +46,7 @@ my $dbh = C4::Context->dbh; $dbh->do(q|DELETE FROM issues|); $dbh->do(q|DELETE FROM items|); $dbh->do(q|DELETE FROM borrowers|); +$dbh->do(q|DELETE FROM clubs|); $dbh->do(q|DELETE FROM branches|); $dbh->do(q|DELETE FROM categories|); $dbh->do(q|DELETE FROM accountlines|); @@ -270,9 +271,11 @@ is( $messages->{NeedsTransfer}, $samplebranch1->{branchcode}, "AddReturn respect $query = "INSERT INTO issues (borrowernumber,itemnumber,branchcode) VALUES( ?,?,? )"; $dbh->do( $query, {}, $borrower_id1, $item_id3, $samplebranch1->{branchcode} ); +t::lib::Mocks::mock_preference( 'item-level_itypes', 1 ); ($doreturn, $messages, $iteminformation, $borrower) = AddReturn('barcode_3', $samplebranch1->{branchcode}); is($messages->{NeedsTransfer},undef,"AddReturn respects branch item return policy - noreturn"); +t::lib::Mocks::mock_preference( 'item-level_itypes', 0 ); $schema->storage->txn_rollback;