Bugzilla – Attachment 31720 Details for
Bug 10900
Incorrect calling conventions accessing C4::Context
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10900 - Follow up, since more has been added to master
Bug-10900---Follow-up-since-more-has-been-added-to.patch (text/plain), 2.70 KB, created by
Jonathan Druart
on 2014-09-18 15:30:18 UTC
(
hide
)
Description:
Bug 10900 - Follow up, since more has been added to master
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-09-18 15:30:18 UTC
Size:
2.70 KB
patch
obsolete
>From da09d61ab58c88f4753d1bdec922115a52572674 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Mon, 12 May 2014 17:57:51 -0400 >Subject: [PATCH] Bug 10900 - Follow up, since more has been added to master > >Booksellers.t and Koha_template_plugin_Branches.t both had >function calls to ::set_userenv added to them. This patch handles >those additions. > >TEST PLAN >--------- >1) Branch a new git branch >2) prove -v t/db_dependent/Bookseller.t > -- It should work. >3) prove -v t/db_dependent/Koha_template_plugin_Branches.t > -- It should work. >4) Apply only the first patch. >5) Repeat steps 2 and 3. > -- They should both FAIL! >6) Apply the second patch as well. >7) Repeat steps 2 and 3. > -- The should both work. > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > t/db_dependent/Bookseller.t | 4 ++-- > t/db_dependent/Koha_template_plugin_Branches.t | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/Bookseller.t b/t/db_dependent/Bookseller.t >index 3c713b3..c4e5926 100644 >--- a/t/db_dependent/Bookseller.t >+++ b/t/db_dependent/Bookseller.t >@@ -634,7 +634,7 @@ ok( exists( $suppliers{$id_supplier1} ), > ; > > C4::Context->_new_userenv('DUMMY SESSION'); >-C4::Context::set_userenv(0,0,0,'firstname','surname', 'BRANCH1', 'Library 1', 0, '', ''); >+C4::Context->set_userenv(0,0,0,'firstname','surname', 'BRANCH1', 'Library 1', 0, '', ''); > my $userenv = C4::Context->userenv; > > my $module = Test::MockModule->new('C4::Auth'); >@@ -666,7 +666,7 @@ is( > ); > > # don the cape and turn into Superlibrarian! >-C4::Context::set_userenv(0,0,0,'firstname','surname', 'BRANCH1', 'Library 1', 1, '', ''); >+C4::Context->set_userenv(0,0,0,'firstname','surname', 'BRANCH1', 'Library 1', 1, '', ''); > @subscriptions = SearchSubscriptions({expiration_date => '2013-12-31'}); > is( > scalar(grep { !$_->{cannotdisplay} } @subscriptions ), >diff --git a/t/db_dependent/Koha_template_plugin_Branches.t b/t/db_dependent/Koha_template_plugin_Branches.t >index 6045220..414a311 100644 >--- a/t/db_dependent/Koha_template_plugin_Branches.t >+++ b/t/db_dependent/Koha_template_plugin_Branches.t >@@ -41,6 +41,6 @@ my $library = $plugin->GetLoggedInBranchcode(); > is($library, '', 'no active library if there is no active user session'); > > C4::Context->_new_userenv('DUMMY_SESSION_ID'); >-C4::Context::set_userenv(123, 'userid', 'usercnum', 'First name', 'Surname', 'MYLIBRARY', 'My Library', 0); >+C4::Context->set_userenv(123, 'userid', 'usercnum', 'First name', 'Surname', 'MYLIBRARY', 'My Library', 0); > $library = $plugin->GetLoggedInBranchcode(); > is($library, 'MYLIBRARY', 'GetLoggedInBranchcode() returns active library'); >-- >2.1.0
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 10900
:
21152
|
21263
|
21290
|
21291
|
21292
|
22037
|
22038
|
22585
|
22937
|
27729
|
28183
|
30243
|
30244
|
31297
|
31298
|
31719
|
31720
|
31721
|
34355
|
34356
|
34357
|
35542
|
35543
|
35544