From b22f017a1684948e89b033966585468a16ad8341 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 5 May 2023 15:53:31 -0300 Subject: [PATCH] Bug 22440: (follow-up) Nothing is forever This patch picks (yet) another class for testing purposes. The class needs to not implement to_api() and to_api_mapping(). Signed-off-by: Tomas Cohen Arazi --- t/db_dependent/Koha/Object.t | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/db_dependent/Koha/Object.t b/t/db_dependent/Koha/Object.t index a49a3784c2..d71a21d735 100755 --- a/t/db_dependent/Koha/Object.t +++ b/t/db_dependent/Koha/Object.t @@ -270,8 +270,8 @@ subtest "to_api() tests" => sub { ok( !exists $api_city->{postal_code}, 'Attribute removed' ); # Pick a class that won't have a mapping for the API - my $illrequest = $builder->build_object({ class => 'Koha::Illrequests' }); - is_deeply( $illrequest->to_api, $illrequest->TO_JSON, 'If no overloaded to_api_mapping method, return TO_JSON' ); + my $action_log = $builder->build_object({ class => 'Koha::ActionLogs' }); + is_deeply( $action_log->to_api, $action_log->TO_JSON, 'If no overloaded to_api_mapping method, return TO_JSON' ); my $biblio = $builder->build_sample_biblio(); my $item = $builder->build_sample_item({ biblionumber => $biblio->biblionumber }); @@ -545,8 +545,8 @@ subtest "to_api_mapping() tests" => sub { $schema->storage->txn_begin; - my $illrequest = $builder->build_object({ class => 'Koha::Illrequests' }); - is_deeply( $illrequest->to_api_mapping, {}, 'If no to_api_mapping present, return empty hashref' ); + my $action_log = $builder->build_object({ class => 'Koha::ActionLogs' }); + is_deeply( $action_log->to_api_mapping, {}, 'If no to_api_mapping present, return empty hashref' ); $schema->storage->txn_rollback; };