Bug 17599: (QA followup) Remove userenv warning
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 15 Nov 2016 15:27:33 +0000 (12:27 -0300)
committerKyle M Hall <kyle@bywatersolutions.com>
Tue, 15 Nov 2016 15:41:43 +0000 (15:41 +0000)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
t/db_dependent/Reserves.t

index 1b8f19c..29f6b00 100755 (executable)
@@ -41,12 +41,6 @@ BEGIN {
     require_ok('C4::Reserves');
 }
 
-# a very minimal mack of userenv for use by the test of DelItemCheck
-my $module = new Test::MockModule('C4::Context');
-$module->mock('userenv', sub {
-    { }
-});
-
 # Start transaction
 my $database = Koha::Database->new();
 my $schema = $database->schema();
@@ -70,6 +64,9 @@ my $category_2 = $builder->build({ source => 'Category' })->{ categorycode };
 my $itemtype = $builder->build(
     { source => 'Itemtype', value => { notforloan => undef } } )->{itemtype};
 
+C4::Context->set_userenv(
+    undef, undef, undef, undef, undef, undef, $branch_1
+);
 
 # Create a helper biblio
 my $bib = MARC::Record->new();