@@ -, +, @@ File: t/db_dependent/Auth.t Line: 74 Tool: Test::More::subtest # Looks like you planned 22 tests but ran 1. ------------------- Non-zero exit status: 255 Parse errors: Bad plan. You planned 22 tests but ran 1. --- t/db_dependent/Auth.t | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) --- a/t/db_dependent/Auth.t +++ a/t/db_dependent/Auth.t @@ -40,11 +40,17 @@ subtest 'checkauth() tests' => sub { plan tests => 3; - my $patron = $builder->build({ source => 'Borrower', value => { flags => undef } })->{userid}; + my $patron = $builder->build_object({ class => 'Koha::Patrons', value => { flags => undef } }); # Mock a CGI object with real userid param my $cgi = Test::MockObject->new(); - $cgi->mock( 'param', sub { return $patron; } ); + $cgi->mock( + 'param', + sub { + my $var = shift; + if ( $var eq 'userid' ) { return $patron->userid; } + } + ); $cgi->mock( 'cookie', sub { return; } ); my $authnotrequired = 1; --