From 484427041b08a2f499488c5a37b9cb32b602773c Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Tue, 24 Dec 2024 10:47:25 +0000 Subject: [PATCH] Bug 38782: Apply same fix for CounterFile.t prove t/db_dependent/Koha/ERM/EUsage/CounterFile.t Signed-off-by: Tomas Cohen Arazi Edit: tidy (tcohen) --- t/db_dependent/Koha/ERM/EUsage/CounterFile.t | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Koha/ERM/EUsage/CounterFile.t b/t/db_dependent/Koha/ERM/EUsage/CounterFile.t index 65c363fa520..7d36fe82e6f 100755 --- a/t/db_dependent/Koha/ERM/EUsage/CounterFile.t +++ b/t/db_dependent/Koha/ERM/EUsage/CounterFile.t @@ -22,7 +22,7 @@ use Test::More tests => 2; use Koha::Database; use Koha::ERM::EUsage::CounterFile; -use JSON qw( decode_json ); +use JSON qw( decode_json ); use File::Basename qw( dirname ); use File::Slurp; @@ -46,6 +46,9 @@ subtest 'store' => sub { $schema->storage->txn_begin; + my $patron = Koha::Patrons->search()->last; + t::lib::Mocks::mock_userenv( { number => $patron->borrowernumber } ); # Is superlibrarian + my $usage_data_provider = $builder->build_object( { class => 'Koha::ERM::EUsage::UsageDataProviders', value => { name => 'TestProvider' } } ); $usage_data_provider->{report_type} = 'TR_J1'; -- 2.47.1