From 65711c9daba5c07ffba5f7cfa6085be2116a75f8 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 10 Mar 2023 11:33:02 -0300 Subject: [PATCH] Bug 33161: (QA follow-up) Fix api_strings_mapping inconsistency Signed-off-by: Tomas Cohen Arazi --- t/db_dependent/Koha/Object.t | 6 +++--- t/db_dependent/Koha/REST/Plugin/Objects.t | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/t/db_dependent/Koha/Object.t b/t/db_dependent/Koha/Object.t index 38a6eaf0e4..a49a3784c2 100755 --- a/t/db_dependent/Koha/Object.t +++ b/t/db_dependent/Koha/Object.t @@ -311,10 +311,10 @@ subtest "to_api() tests" => sub { } }; - # mock Koha::Item so it implements 'api_strings_mapping' + # mock Koha::Item so it implements 'strings_map' my $item_mock = Test::MockModule->new('Koha::Item'); $item_mock->mock( - 'api_strings_mapping', + 'strings_map', sub { return $_strings; } @@ -475,7 +475,7 @@ subtest "to_api() tests" => sub { my $city_mock = Test::MockModule->new('Koha::City'); $city_mock->mock( - 'api_strings_mapping', + 'strings_map', sub { my ( $self, $params ) = @_; diff --git a/t/db_dependent/Koha/REST/Plugin/Objects.t b/t/db_dependent/Koha/REST/Plugin/Objects.t index 3a4832f2f5..99626ac552 100755 --- a/t/db_dependent/Koha/REST/Plugin/Objects.t +++ b/t/db_dependent/Koha/REST/Plugin/Objects.t @@ -673,7 +673,7 @@ subtest 'objects.find helper with expanded authorised values' => sub { my $city_class = Test::MockModule->new('Koha::City'); $city_class->mock( - 'api_strings_mapping', + 'strings_map', sub { my ($self, $params) = @_; use Koha::AuthorisedValues; @@ -786,7 +786,7 @@ subtest 'objects.search helper with expanded authorised values' => sub { my $city_class = Test::MockModule->new('Koha::City'); $city_class->mock( - 'api_strings_mapping', + 'strings_map', sub { my ($self, $params) = @_; use Koha::AuthorisedValues; -- 2.39.5