From 645ace73530addbb36e452c0e7d41518c911d769 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 20 Mar 2026 07:50:33 +0000 Subject: [PATCH] Bug 42098: (follow-up) Enable plugin in ImportBatch.t test The Handler::run change to skip disabled plugins broke the RecordsFromMarcPlugin subtest in ImportBatch.t. The MarcFieldValues plugin was installed but never enabled, so Handler::run returned early. Add $plugin->enable() before calling RecordsFromMarcPlugin. Signed-off-by: Martin Renvoize Signed-off-by: Laura Escamilla --- t/db_dependent/ImportBatch.t | 2 ++ 1 file changed, 2 insertions(+) diff --git a/t/db_dependent/ImportBatch.t b/t/db_dependent/ImportBatch.t index 85ad8f00e8..c5820bb977 100755 --- a/t/db_dependent/ImportBatch.t +++ b/t/db_dependent/ImportBatch.t @@ -308,9 +308,11 @@ subtest "RecordsFromMarcPlugin" => sub { $plugins->InstallPlugins; my ($plugin) = $plugins->GetPlugins( { all => 1, metadata => { name => 'MarcFieldValues' } } ); isnt( $plugin, undef, "Plugin found" ); + $plugin->enable(); my $records = C4::ImportBatch::RecordsFromMarcPlugin( $name, ref $plugin, 'UTF-8' ); is( @$records, 2, 'Two results returned' ); is( ref $records->[0], 'MARC::Record', 'Returned MARC::Record object' ); + if ( C4::Context->preference('marcflavour') eq 'UNIMARC' ) { is( $records->[0]->subfield( '200', 'a' ), 'Silence in the library',