Bug 11587 - Add UT for IsSuperLibrarian if flags == 0
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 850e7e5835)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
t/Context.t
This commit is contained in:
parent
e9154d0b0e
commit
50b2d2abb9
|
|
@ -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" );
|
||||
|
|
|
|||
Loading…
Reference in New Issue