Bugzilla – Attachment 24588 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 - IsSuperLibrarian generates warnings
Bug-11587---IsSuperLibrarian-generates-warnings.patch (text/plain), 1.61 KB, created by
Mark Tompsett
on 2014-01-21 05:51:10 UTC
(
hide
)
Description:
Bug 11587 - IsSuperLibrarian generates warnings
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2014-01-21 05:51:10 UTC
Size:
1.61 KB
patch
obsolete
>From 2acf7c4ce60f25014bdfb49ae3de9b690cacd53c Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Tue, 21 Jan 2014 00:34:43 -0500 >Subject: [PATCH] Bug 11587 - IsSuperLibrarian generates warnings > >Simply viewing OPAC detail triggers a modulus warning entry. >This first patch adds two test cases to t/Context.t to test for >this situation. > >TEST PLAN >--------- >1) Apply this patch (to upgrade t/Context.t) >2) prove -v t/Context.t >-- Tests 7 and 8 will fail >3) Apply second patch (to amend C4/Context.pm) >4) prove -v t/Context.t >-- All tests will succeed >--- > t/Context.t | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/t/Context.t b/t/Context.t >index 446e254..46e353e 100755 >--- a/t/Context.t >+++ b/t/Context.t >@@ -2,7 +2,7 @@ > > use Modern::Perl; > use DBI; >-use Test::More tests => 10; >+use Test::More tests => 12; > use Test::MockModule; > > BEGIN { >@@ -31,6 +31,11 @@ $is_super_librarian = eval{ C4::Context::IsSuperLibrarian() }; > is ( $@, q||, "IsSuperLibrarian does not log an error if userenv is defined" ); > 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=0, it is not a super librarian" ); >+ > is(C4::Context::db_scheme2dbi('mysql'), 'mysql', 'ask for mysql, get mysql'); > is(C4::Context::db_scheme2dbi('Pg'), 'Pg', 'ask for Pg, get Pg'); > is(C4::Context::db_scheme2dbi('xxx'), 'mysql', 'ask for unsupported DBMS, get mysql'); >-- >1.7.9.5
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