Bugzilla – Attachment 30295 Details for
Bug 12672
GetMarcISBN should return the corresponding subfield
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12672: (regression test) GetMarcISBN should return the corresponding subfield
Bug-12672-regression-test-GetMarcISBN-should-retur.patch (text/plain), 1.69 KB, created by
Tomás Cohen Arazi (tcohen)
on 2014-07-29 17:00:45 UTC
(
hide
)
Description:
Bug 12672: (regression test) GetMarcISBN should return the corresponding subfield
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2014-07-29 17:00:45 UTC
Size:
1.69 KB
patch
obsolete
>From 747585776664b8b14fd8c3a66267ab195e3b0cbf Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@gmail.com> >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 >--- > 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 3c0a159..ca6c678 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; >-- >1.9.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 12672
:
30295
|
30296
|
30346
|
30347
|
30502
|
30503