diff --git a/t/Context.t b/t/Context.t index 98203a2571..501af1b3b4 100755 --- a/t/Context.t +++ b/t/Context.t @@ -2,7 +2,7 @@ use Modern::Perl; use DBI; -use Test::More tests => 8; +use Test::More tests => 10; use Test::MockModule; BEGIN { @@ -34,4 +34,9 @@ is ( $is_super_librarian, 1, "With flag=1, it is a super librarian" ); $userenv->{flags} = undef; $is_super_librarian = eval{ C4::Context::IsSuperLibrarian() }; is ( $@, q||, "IsSuperLibrarian does not log an error if \$userenv->{flags} is undefined" ); +is ( $is_super_librarian, 0, "With flag=undef, it is not a super librarian" ); + +$userenv->{flags} = 0; +$is_super_librarian = eval{ C4::Context::IsSuperLibrarian() }; +is ( $@, q||, "IsSuperLibrarian does not log an error if \$userenv->{flags} is equal to 0" ); is ( $is_super_librarian, 0, "With flag=0, it is not a super librarian" );