From bad4de0347966b34ea22154ca612bb27a66db3d6 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 8 Jul 2016 09:45:12 -0300 Subject: [PATCH] Bug 14504: (QA followup) Tidy tests This patch re-introduces the transaction into t/db_dependent/Items_DelItemCheck.t and does some cleaning on the touched tests so they raise less warnings. Signed-off-by: Tomas Cohen Arazi --- t/db_dependent/Reserves.t | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/t/db_dependent/Reserves.t b/t/db_dependent/Reserves.t index db13f82..ea3f700 100755 --- a/t/db_dependent/Reserves.t +++ b/t/db_dependent/Reserves.t @@ -18,6 +18,7 @@ use Modern::Perl; use Test::More tests => 74; +use Test::MockModule; use Test::Warn; use MARC::Record; @@ -39,9 +40,10 @@ BEGIN { } # a very minimal mack of userenv for use by the test of DelItemCheck -*C4::Context::userenv = sub { - return {}; -}; +my $module = new Test::MockModule('C4::Context'); +$module->mock('userenv', sub { + { } +}); my $dbh = C4::Context->dbh; -- 2.9.2