From ab031ac9d1e587fcf27a64374d9b01675ea1796d Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Mon, 21 Aug 2017 22:51:13 +0000 Subject: [PATCH] [SIGNED-OFF] Bug 14385: Trigger the C4::ILSDI::Services changes prove t/db_dependent/ILSDI_Services.t Signed-off-by: Aleisha Amohia --- t/db_dependent/ILSDI_Services.t | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/ILSDI_Services.t b/t/db_dependent/ILSDI_Services.t index 7677db0..65e2412 100644 --- a/t/db_dependent/ILSDI_Services.t +++ b/t/db_dependent/ILSDI_Services.t @@ -19,7 +19,7 @@ use Modern::Perl; use CGI qw ( -utf8 ); -use Test::More tests => 3; +use Test::More tests => 4; use Test::MockModule; use t::lib::Mocks; use t::lib::TestBuilder; @@ -198,3 +198,42 @@ subtest 'GetPatronInfo/GetBorrowerAttributes test for extended patron attributes $schema->storage->txn_rollback; }; + +# This is a stub, as it merely is for triggering the GetMarcBiblio call. +subtest 'GetRecords' => sub { + + plan tests => 1; + + $schema->storage->txn_begin; + + my $biblio = $builder->build({ + source => 'Biblio', + value => { + title => 'Title 1', }, + }); + + my $item = $builder->build({ + source => 'Item', + value => { + biblionumber => $biblio->{biblionumber}, + }, + }); + + my $biblioitem = $builder->build({ + source => 'Biblioitem', + value => { + biblionumber => $biblio->{biblionumber}, + itemnumber => $item->{itemnumber}, + }, + }); + + my $query = CGI->new({ + 'schema' => 'MARCXML', + 'id' => [ $biblio->{biblionumber} ] + }); + + my $result = C4::ILSDI::Services::GetRecords($query); + ok($result,'There is a result'); + + $schema->storage->txn_rollback; +} -- 2.1.4