Bug 40353: Remove warnings from Koha/Patron.t
C4::Context->userenv not defined! at /kohadevbox/koha/Koha/Patron.pm line 2152. C4::Context->userenv not defined! at /kohadevbox/koha/Koha/Patron.pm line 2152. C4::Context->userenv not defined! at /kohadevbox/koha/Koha/Patron.pm line 2152. We need to mock the userenv Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
12e4e92e53
commit
3b1bc1bbc5
|
|
@ -739,6 +739,8 @@ subtest 'to_api() tests' => sub {
|
|||
}
|
||||
);
|
||||
|
||||
t::lib::Mocks::mock_userenv( { patron => $consumer } );
|
||||
|
||||
my $restricted = $patron->to_api( { user => $consumer } )->{restricted};
|
||||
ok( defined $restricted, 'restricted is defined' );
|
||||
ok( !$restricted, 'debarred is undef, restricted evaluates to false' );
|
||||
|
|
|
|||
Loading…
Reference in New Issue