From fc0a201bd9a301a05b52bfd50fd4024c68749feb Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 14 Jan 2014 19:25:22 +0000 Subject: [PATCH] Bug 11537: (follow-up) mock C4::Context::preference This avoids turning t/Log.t into one that requires a valid session context. To test: [1] Run the following and verify that the test passes. unset KOHA_CONF prove -v t/Log.t Signed-off-by: Galen Charlton --- t/Log.t | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/t/Log.t b/t/Log.t index 797475861e..601b909974 100755 --- a/t/Log.t +++ b/t/Log.t @@ -7,11 +7,20 @@ use strict; use warnings; use Test::More tests => 3; +use t::lib::Mocks; BEGIN { use_ok('C4::Log'); } +t::lib::Mocks::mock_preference('BorrowersLog', 1); +t::lib::Mocks::mock_preference('CataloguingLog', 1); +t::lib::Mocks::mock_preference('IssueLog', 1); +t::lib::Mocks::mock_preference('ReturnLog', 1); +t::lib::Mocks::mock_preference('SubscriptionLog', 1); +t::lib::Mocks::mock_preference('LetterLog', 1); +t::lib::Mocks::mock_preference('FinesLog', 1); + ok( my $hash=GetLogStatus(),"Testing GetLogStatus"); ok( $hash->{BorrowersLog}, 'Testing hash is non empty'); -- 2.20.1