From 5f49a144ea476b2e8abfa3c9cd2e87177206912f Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 7 Jul 2025 15:00:12 +0200 Subject: [PATCH] Bug 40277: Add a test Signed-off-by: Jonathan Druart --- t/db_dependent/Koha.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Koha.t b/t/db_dependent/Koha.t index 986a8b354c5..a73738c9407 100755 --- a/t/db_dependent/Koha.t +++ b/t/db_dependent/Koha.t @@ -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 { -- 2.34.1