From c90a4389081a8092c3d509c3773ab931fd80f938 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 16 Nov 2016 12:40:31 +0000 Subject: [PATCH] [SIGNED-OFF] Bug 17644 - t/db_dependent/Exporter/Record.t fails Test Plan: 1) prove t/db_dependent/Exporter/Record.t fails 2) Apply this patch 3) prove t/db_dependent/Exporter/Record.t succeeds! Signed-off-by: Josef Moravec --- t/db_dependent/Exporter/Record.t | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/Exporter/Record.t b/t/db_dependent/Exporter/Record.t index cefd7d2..367838f 100644 --- a/t/db_dependent/Exporter/Record.t +++ b/t/db_dependent/Exporter/Record.t @@ -31,6 +31,8 @@ use Encode; use C4::Biblio; use C4::Context; use Koha::Database; +use Koha::Biblio; +use Koha::Biblioitem; use Koha::Exporter::Record; my $schema = Koha::Database->new->schema; @@ -55,8 +57,9 @@ $biblio_2->append_fields( ); my ($biblionumber_2, $biblioitemnumber_2) = AddBiblio($biblio_2, ''); -my ($bad_biblionumber, $bad_biblioitemnumber) = AddBiblio($biblio_1, ''); -Koha::Biblioitems->find( $bad_biblionumber )->marcxml("something wrong")->store; +my $bad_biblio = Koha::Biblio->new()->store(); +my $bad_biblioitem = Koha::Biblioitem->new( { biblionumber => $bad_biblio->id, marcxml => 'something wrong' } )->store(); +my $bad_biblionumber = $bad_biblio->id; my $builder = t::lib::TestBuilder->new; my $item_1_1 = $builder->build({ -- 2.1.4