Bug 34916: Fix wrong borrowernumber in ArticleRequests.t

Simple fix: Send patron to userenv instead of library only.

Test plan:
Do not apply patch.
Remove borrowernumber 51.
Run t/db_dependent/Koha/ArticleRequests.t. (FAIL)
Apply patch, rerun test (PASS)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7d93d18548)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Marcel de Rooy 2023-09-26 13:45:35 +00:00 committed by Fridolin Somers
parent b6cc786dfd
commit 47d9e00a70
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ subtest 'requested() tests' => sub {
my $library_2 = $builder->build_object( { class => 'Koha::Libraries' } );
my $patron = $builder->build_object( { class => 'Koha::Patrons', value => { branchcode => $library_1->id, flags => 1 } } );
t::lib::Mocks::mock_userenv( { branchcode => $library_1 } );
t::lib::Mocks::mock_userenv( { patron => $patron } );
# FIXME: we moved past this pattern. This method should be refactored
# as ->filter_by_requested