From ca0e117b2cd31c4c256e91aef55074305fbb9d3d Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 22 Mar 2024 09:48:14 +0000 Subject: [PATCH] Bug 36397: Quick fix for Koha/Plugins/authority_hooks.t Lazy approach for now: just ignore the other warnings that are logical when passing blank records to SearchEngine. Elastic is a bit more sensitive than Zebra here.. Test plan: Run t/db_dependent/Koha/Plugins/authority_hooks.t Signed-off-by: Marcel de Rooy Signed-off-by: David Nind Signed-off-by: Katrin Fischer --- t/db_dependent/Koha/Plugins/authority_hooks.t | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/db_dependent/Koha/Plugins/authority_hooks.t b/t/db_dependent/Koha/Plugins/authority_hooks.t index 96e4b6b562..99e4634db8 100755 --- a/t/db_dependent/Koha/Plugins/authority_hooks.t +++ b/t/db_dependent/Koha/Plugins/authority_hooks.t @@ -53,15 +53,15 @@ subtest 'after_authority_action hook' => sub { my $plugin = Koha::Plugin::Test->new->enable; my $id; - warning_like { ( $id ) = C4::AuthoritiesMarc::AddAuthority( MARC::Record->new, undef, 'PERSO_NAME' ); } + warnings_exist { ( $id ) = C4::AuthoritiesMarc::AddAuthority( MARC::Record->new, undef, 'PERSO_NAME' ); } qr/after_authority_action called with action: create, id: \d+/, 'AddAuthority calls the hook with action=create, id passed'; - warning_like { C4::AuthoritiesMarc::ModAuthority( $id, MARC::Record->new, 'PERSO_NAME', { skip_merge => 1 } ); } + warnings_exist { C4::AuthoritiesMarc::ModAuthority( $id, MARC::Record->new, 'PERSO_NAME', { skip_merge => 1 } ); } qr/after_authority_action called with action: modify, id: $id/, 'ModAuthority calls the hook with action=modify, id passed'; - warning_like { C4::AuthoritiesMarc::DelAuthority({ authid => $id, skip_merge => 1 }); } + warnings_exist { C4::AuthoritiesMarc::DelAuthority({ authid => $id, skip_merge => 1 }); } qr/after_authority_action called with action: delete, id: $id/, 'DelAuthority calls the hook with action=delete, id passed'; -- 2.39.5