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:
parent
ec8897377e
commit
ca0e117b2c
|
|
@ -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';
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue