Bug 40277: Add a test

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1c7cb4d43b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
Jonathan Druart 2025-07-07 15:00:12 +02:00 committed by Paul Derscheid
parent 8854037fbd
commit 342f6465f2
No known key found for this signature in database
GPG Key ID: C25F9FD44CED595B
1 changed files with 5 additions and 1 deletions

View File

@ -11,6 +11,7 @@ use Test::Warn;
use Test::Deep;
use t::lib::TestBuilder;
use t::lib::Mocks;
use C4::Context;
use Koha::Database;
@ -33,7 +34,7 @@ my $dbh = C4::Context->dbh;
our $itype_1 = $builder->build( { source => 'Itemtype' } );
subtest 'Authorized Values Tests' => sub {
plan tests => 4;
plan tests => 5;
my $data = {
category => 'CATEGORY',
@ -166,6 +167,9 @@ subtest 'Authorized Values Tests' => sub {
warning_is { GetAuthorisedValues() } [], 'No warning when no parameter passed to GetAuthorisedValues';
C4::Context->set_userenv();
warning_is { GetAuthorisedValues("BUG10656") } [], 'No warning when userenv is anonymous';
};
subtest 'isbn tests' => sub {