Bug 41795: Fix failing test in UNIMARC instances
Previously, t/AuthoritiesMarc_MARC21.t would fail if you tried to run it from within a UNIMARC instance. This patch fixes that. Test plan: 1) Inside a UNIMARC instance, run the test and notice the subtest failure: $ prove -v t/AuthoritiesMarc_MARC21.t 2) Apply this patch. 3) Re-run the test and notice that it now completes without any failures. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
e43d32a123
commit
2b691bd4dd
|
|
@ -59,9 +59,17 @@ subtest "FindDuplicateAuthority tests" => sub {
|
|||
}
|
||||
);
|
||||
|
||||
my $marcflavour = C4::Context->preference('marcflavour');
|
||||
my $field;
|
||||
if ( $marcflavour eq 'MARC21' ) {
|
||||
$field = '155'; # GENRE/FORM field in MARC21
|
||||
} elsif ( $marcflavour eq 'UNIMARC' ) {
|
||||
$field = '280'; # GENRE/FORM field in UNIMARC
|
||||
}
|
||||
|
||||
my $record = MARC::Record->new;
|
||||
$record->append_fields(
|
||||
MARC::Field->new( '155', '', '', a => 'Potato' ),
|
||||
MARC::Field->new( $field, '', '', a => 'Potato' ),
|
||||
);
|
||||
|
||||
t::lib::Mocks::mock_preference( 'SearchEngine', 'Zebra' );
|
||||
|
|
|
|||
Loading…
Reference in New Issue