Bugzilla – Attachment 30116 Details for
Bug 12457
The module C4::Members.pm needs more unit tests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12457: Removal warning in t/db_dependent/Members.t
Bug-12457-Removal-warning-in-tdbdependentMemberst.patch (text/plain), 2.04 KB, created by
Jonathan Druart
on 2014-07-25 14:24:38 UTC
(
hide
)
Description:
Bug 12457: Removal warning in t/db_dependent/Members.t
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-07-25 14:24:38 UTC
Size:
2.04 KB
patch
obsolete
>From c9c37e0bb3815e28d7c4608cc603c2f46ec0db75 Mon Sep 17 00:00:00 2001 >From: Yohann Dufour <dufour.yohann@gmail.com> >Date: Fri, 20 Jun 2014 14:31:53 +0200 >Subject: [PATCH] Bug 12457: Removal warning in t/db_dependent/Members.t > >When I execute prove t/db_dependent/Members.t, this warning appears twice : >"Argument "Test" isn't numeric in modulus (%) at /home/yohann/koha/C4/Context.pm line 1256." > >The warning is due to a invalid use of the routine set_userenv > >Test plan: >1/ Execute : prove t/db_dependent/Members.t >2/ The warning appears twice : >"Argument "Test" isn't numeric in modulus (%) at /home/yohann/koha/C4/Context.pm line 1256." >3/ Apply the patch >4/ Execute : prove t/db_dependent/Members.t >5/ The result has to be a success without error or warning : >t/db_dependent/Members.t .. ok >All tests successful. >Files=1, Tests=26, 2 wallclock secs ( 0.04 usr 0.01 sys + 1.50 cusr 0.08 csys = 1.63 CPU) >Result: PASS > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > t/db_dependent/Members.t | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/Members.t b/t/db_dependent/Members.t >index 7bbf1ca..340a6c9 100755 >--- a/t/db_dependent/Members.t >+++ b/t/db_dependent/Members.t >@@ -61,10 +61,10 @@ my @USERENV = ( > 'Test', > 0, > ); >-my $BRANCH_IDX = 4; >+my $BRANCH_IDX = 5; > > C4::Context->_new_userenv ('DUMMY_SESSION_ID'); >-C4::Context->set_userenv ( @USERENV ); >+C4::Context::set_userenv ( @USERENV ); > > my $userenv = C4::Context->userenv > or BAIL_OUT("No userenv"); >@@ -155,7 +155,7 @@ ok (!_find_member($results), "Search (arrayref) for independent branches, differ > or diag("Card $CARDNUMBER found in the resultset for independent branches: ".Dumper(C4::Context->preference($INDEPENDENT_BRANCHES_PREF), $results)); > > $USERENV[$BRANCH_IDX] = $BRANCHCODE; >-C4::Context->set_userenv ( @USERENV ); >+C4::Context::set_userenv ( @USERENV ); > > $results = Search("$CHANGED_FIRSTNAME $SURNAME", "surname"); > ok (_find_member($results), "Full name Search (string) for independent branches, same branch") >-- >2.0.0.rc2
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 12457
:
29094
|
29173
|
29742
|
29908
|
30116
|
30117
|
30118
|
30187
|
30266
|
30309
|
30310
|
30311