Bugzilla – Attachment 30302 Details for
Bug 12554
C4::Biblio GetMarcPrice does not handle NORMARC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12554: (regression test) C4::Biblio::GetMarcPrice does not handle NORMARC
Bug-12554-regression-test-C4BiblioGetMarcPrice-doe.patch (text/plain), 2.14 KB, created by
Tomás Cohen Arazi (tcohen)
on 2014-07-29 18:54:26 UTC
(
hide
)
Description:
Bug 12554: (regression test) C4::Biblio::GetMarcPrice does not handle NORMARC
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2014-07-29 18:54:26 UTC
Size:
2.14 KB
patch
obsolete
>From 6d137bdc033d4eda575455212970297acd7bf379 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@gmail.com> >Date: Tue, 29 Jul 2014 15:53:10 -0300 >Subject: [PATCH] Bug 12554: (regression test) C4::Biblio::GetMarcPrice does > not handle NORMARC > >--- > C4/Biblio.pm | 1 + > t/db_dependent/Biblio.t | 13 +++++++------ > 2 files changed, 8 insertions(+), 6 deletions(-) > >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index 78e2bad..05b0a9d 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -33,6 +33,7 @@ use Module::Load::Conditional qw(can_load); > use C4::Koha; > use C4::Dates qw/format_date/; > use C4::Log; # logaction >+use C4::Budgets; > use C4::ClassSource; > use C4::Charset; > use C4::Linker; >diff --git a/t/db_dependent/Biblio.t b/t/db_dependent/Biblio.t >index ca6c678..137946e 100755 >--- a/t/db_dependent/Biblio.t >+++ b/t/db_dependent/Biblio.t >@@ -33,7 +33,7 @@ $dbh->{AutoCommit} = 0; > $dbh->{RaiseError} = 1; > > # Mocking variables >-my $context = new Test::MockModule('C4::Context'); >+my $context = new Test::MockModule('C4::Context'); > > mock_marcfromkohafield(); > >@@ -178,7 +178,8 @@ sub run_tests { > is( $isbns->[$i], $more_isbns[$i], > "(GetMarcISBN) Corretly retrieves ISBN #". ($i + 1)); > } >- >+ is( GetMarcPrice( $record_for_isbn, $marcflavour ), 100, >+ "GetMarcPrice returns the correct value"); > } > > sub mock_marcfromkohafield { >@@ -230,7 +231,7 @@ sub create_isbn_field { > 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' ); >+ $field->add_subfields( $price_subfield => '$100' ); > > return $field; > } >@@ -245,19 +246,19 @@ sub create_issn_field { > } > > subtest 'MARC21' => sub { >- plan tests => 25; >+ plan tests => 26; > run_tests('MARC21'); > $dbh->rollback; > }; > > subtest 'UNIMARC' => sub { >- plan tests => 25; >+ plan tests => 26; > run_tests('UNIMARC'); > $dbh->rollback; > }; > > subtest 'NORMARC' => sub { >- plan tests => 25; >+ plan tests => 26; > run_tests('NORMARC'); > $dbh->rollback; > }; >-- >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 12554
:
29619
|
30152
|
30170
| 30302