diff --git a/t/db_dependent/Koha/Object.t b/t/db_dependent/Koha/Object.t index 4794fb1b70..8d11feb3ee 100755 --- a/t/db_dependent/Koha/Object.t +++ b/t/db_dependent/Koha/Object.t @@ -383,6 +383,8 @@ subtest "to_api() tests" => sub { } ); + t::lib::Mocks::mock_userenv( { patron => $patron } ); + my $patron_api = $patron->to_api( { embed => { holds_count => { is_count => 1 } },