From 2b06f31c05f95e07871375afe84a79b3da8f43bb Mon Sep 17 00:00:00 2001 From: Josef Moravec Date: Thu, 7 Mar 2019 07:23:33 +0000 Subject: [PATCH] Bug 20443: (follow-up) Fix t/db_dependent/Koha/Patrons.t Signed-off-by: Nick Clemens --- t/db_dependent/Koha/Patrons.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/Koha/Patrons.t b/t/db_dependent/Koha/Patrons.t index 4e606beee6..8a66a3d0ae 100644 --- a/t/db_dependent/Koha/Patrons.t +++ b/t/db_dependent/Koha/Patrons.t @@ -2028,7 +2028,7 @@ subtest 'extended_attributes' => sub { my $patron_1 = $builder->build_object({class=> 'Koha::Patrons'}); my $patron_2 = $builder->build_object({class=> 'Koha::Patrons'}); - set_logged_in_user($patron_1); + t::lib::Mocks::mock_userenv({ patron => $patron_1 }); my $attribute_type1 = Koha::Patron::Attribute::Type->new( { @@ -2103,7 +2103,7 @@ subtest 'extended_attributes' => sub { is( $non_existent, undef, 'Koha::Patron->get_extended_attribute must return undef if the attribute does not exist' ); # Test branch limitations - set_logged_in_user($patron_2); + t::lib::Mocks::mock_userenv({ patron => $patron_2 }); # Return all $extended_attributes_for_1 = $patron_1->extended_attributes; is( $extended_attributes_for_1->count, 3, 'There should be 2 attributes for patron 1, the limited one should be returned'); -- 2.20.1