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 <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Marcel de Rooy 2024-03-22 09:48:14 +00:00 committed by Katrin Fischer
parent ec8897377e
commit ca0e117b2c
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 3 additions and 3 deletions

View File

@ -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';