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 <martin.renvoize@openfifth.co.uk> Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
This commit is contained in:
parent
435cf5cba1
commit
645ace7353
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Reference in New Issue