Bug 19042: Silence warnings t/db_dependent/Letters.t
authorMark Tompsett <mtompset@hotmail.com>
Fri, 4 Aug 2017 18:24:38 +0000 (14:24 -0400)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 10 Aug 2017 19:25:31 +0000 (16:25 -0300)
TEST PLAN
---------
prove t/db_dependent/Letters.t
-- there will be a message: "C4::Context->userenv not defined!"
apply this patch
prove t/db_dependent/Letters.t
-- there will no longer be that message.
run qa test tools

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
t/db_dependent/Letters.t

index cbb2bec..c0a8a5d 100644 (file)
@@ -196,7 +196,9 @@ subtest 'getletter' => sub {
 
     my $context = Test::MockModule->new('C4::Context');
     $context->mock( 'userenv', sub {
-        return { branch => "anotherlib" }
+        return {
+            flags  => 1,
+            branch => "anotherlib" }
     });
 
     t::lib::Mocks::mock_preference('IndependentBranches', 1);