Bug 12674: (regression tests) GetMarcISSN should not return empty ISSN

Proves GetMarcISSN returns empty ISSNs in the results array.

To reproduce:
 - Run $ prove -v t/db_dependent/Biblio.t

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
Tomás Cohen Arazi 2014-07-29 16:09:18 -03:00
parent 1de8a7d899
commit f5b26fd0ce

View file

@ -143,6 +143,12 @@ sub run_tests {
$issns = GetMarcISSN( $marc_record, $marcflavour );
is( scalar @$issns, 4,
'GetMARCISSN handles records with multiple ISSN fields (count correct)');
# Create an empty ISSN
$field = create_issn_field( "", $marcflavour );
$marc_record->append_fields($field);
$issns = GetMarcISSN( $marc_record, $marcflavour );
is( scalar @$issns, 4,
'GetMARCISSN skips empty ISSN fields (Bug 12674)');
## Testing GetMarcControlnumber
my $controlnumber;
@ -254,19 +260,19 @@ sub create_issn_field {
}
subtest 'MARC21' => sub {
plan tests => 26;
plan tests => 27;
run_tests('MARC21');
$dbh->rollback;
};
subtest 'UNIMARC' => sub {
plan tests => 26;
plan tests => 27;
run_tests('UNIMARC');
$dbh->rollback;
};
subtest 'NORMARC' => sub {
plan tests => 26;
plan tests => 27;
run_tests('NORMARC');
$dbh->rollback;
};