Bug 12672: (regression test) GetMarcISBN should return the corresponding subfield
Run:
$ prove -v t/db_dependent/Biblio.t
=> FAIL: GetMarcISBN doesn't return the expected value for ISBN
in MARC21, NORMARC and UNIMARC
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Test fails, no koha-qa errors.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
parent
5c42809746
commit
a111d3149d
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
use Modern::Perl;
|
||||
|
||||
use Test::More tests => 3;
|
||||
use Test::More tests => 4;
|
||||
use Test::MockModule;
|
||||
|
||||
use MARC::Record;
|
||||
|
|
@ -187,7 +187,8 @@ sub mock_marcfromkohafield {
|
|||
sub {
|
||||
my ( $self ) = shift;
|
||||
|
||||
if ( C4::Context->preference('marcflavour') eq 'MARC21' ) {
|
||||
if ( C4::Context->preference('marcflavour') eq 'MARC21' ||
|
||||
C4::Context->preference('marcflavour') eq 'NORMARC' ) {
|
||||
|
||||
return {
|
||||
'' => {
|
||||
|
|
@ -227,6 +228,9 @@ sub create_isbn_field {
|
|||
|
||||
my $isbn_field = ( $marcflavour eq 'UNIMARC' ) ? '010' : '020';
|
||||
my $field = MARC::Field->new( $isbn_field,'','','a' => $isbn);
|
||||
# Add the price subfield
|
||||
my $price_subfield = ( $marcflavour eq 'UNIMARC' ) ? 'd' : 'c' ;
|
||||
$field->add_subfields( $price_subfield => '100' );
|
||||
|
||||
return $field;
|
||||
}
|
||||
|
|
@ -252,5 +256,11 @@ subtest 'UNIMARC' => sub {
|
|||
$dbh->rollback;
|
||||
};
|
||||
|
||||
subtest 'NORMARC' => sub {
|
||||
plan tests => 25;
|
||||
run_tests('NORMARC');
|
||||
$dbh->rollback;
|
||||
};
|
||||
|
||||
|
||||
1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue