From 24bbe8717533ead9f555a17b7bdb8339348c4672 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 21 Aug 2013 14:23:24 +0200 Subject: [PATCH] Bug 8435: The unit tests should create the biblio Previous version does not create the biblio. --- t/db_dependent/Serials_2.t | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/t/db_dependent/Serials_2.t b/t/db_dependent/Serials_2.t index 83bcbf8..72d71d9 100644 --- a/t/db_dependent/Serials_2.t +++ b/t/db_dependent/Serials_2.t @@ -3,6 +3,8 @@ use Modern::Perl; use Test::More tests => 4; +use MARC::Record; +use C4::Biblio qw( AddBiblio ); use_ok('C4::Serials'); use_ok('C4::Budgets'); @@ -13,11 +15,16 @@ $dbh->{RaiseError} = 1; my $supplierlist=eval{GetSuppliersWithLateIssues()}; ok(length($@)==0,"No SQL problem in GetSuppliersWithLateIssues"); -my $biblionumber = 1; +my $record = MARC::Record->new(); +$record->append_fields( + MARC::Field->new( '952', '0', '0', a => 'CPL', b => 'CPL' ) +); +my ( $biblionumber, $biblioitemnumber ) = C4::Biblio::AddBiblio($record, ''); + my $budgetid; my $bpid = AddBudgetPeriod({ budget_period_startdate => '01-01-2015', - budget_period_enddate => '31-12-2015', + budget_period_enddate => '12-31-2015', budget_description => "budget desc" }); @@ -37,7 +44,7 @@ my $subscriptionid = NewSubscription( undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, 1, "notes", undef, undef, undef, undef, undef, undef, 0, - "intnotes", 0, undef, undef, 0, undef, '31-12-2013', + "intnotes", 0, undef, undef, 0, undef, '12-31-2013', ); die unless $subscriptionid; -- 1.7.10.4