From a111d3149dfd1872c0232b2349baf0e8b0c16048 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 29 Jul 2014 13:36:03 -0300 Subject: [PATCH] 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 Test fails, no koha-qa errors. Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- t/db_dependent/Biblio.t | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/Biblio.t b/t/db_dependent/Biblio.t index 3c0a15944f..ca6c678fb3 100755 --- a/t/db_dependent/Biblio.t +++ b/t/db_dependent/Biblio.t @@ -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; -- 2.39.2