@@ -, +, @@ --- t/db_dependent/ILSDI_Services.t | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) --- a/t/db_dependent/ILSDI_Services.t +++ a/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; +} --