Bugzilla – Attachment 24678 Details for
Bug 11587
IsSuperLibrarian generates warnings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11587 - Add UT for IsSuperLibrarian if flags == 0
Bug-11587---Add-UT-for-IsSuperLibrarian-if-flags--.patch (text/plain), 1.30 KB, created by
Jonathan Druart
on 2014-01-24 12:05:42 UTC
(
hide
)
Description:
Bug 11587 - Add UT for IsSuperLibrarian if flags == 0
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-01-24 12:05:42 UTC
Size:
1.30 KB
patch
obsolete
>From f012d0337797b84ac0c32bec775063390a5300d7 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Fri, 24 Jan 2014 13:00:37 +0100 >Subject: [PATCH] Bug 11587 - Add UT for IsSuperLibrarian if flags == 0 > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > t/Context.t | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/t/Context.t b/t/Context.t >index 46e353e..6775b8e 100755 >--- a/t/Context.t >+++ b/t/Context.t >@@ -2,7 +2,7 @@ > > use Modern::Perl; > use DBI; >-use Test::More tests => 12; >+use Test::More tests => 14; > use Test::MockModule; > > BEGIN { >@@ -34,6 +34,11 @@ 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" ); > > is(C4::Context::db_scheme2dbi('mysql'), 'mysql', 'ask for mysql, get mysql'); >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11587
:
24587
|
24588
|
24589
|
24666
|
24667
|
24676
|
24677
| 24678