use strict;
use lib 'lib';
-use Test::More tests => 27;
+use Test::More tests => 28;
BEGIN {
use_ok( 'WebPAC::Test' );
%LOG
), "new");
+my $path = '/tmp/koha.marc';
+
ok(my $db = $input->open(
- path => '/tmp/koha.marc', # required?
+ path => $path,
dsn => 'dbi:mysql:database=koha',
user => $ENV{KOHA_USER},
passwd => $ENV{KOHA_PASSWD},
- sql => q{
- select biblioitemnumber as mfn, marc from biblioitems limit 7
- },
+ limit => 7,
+ offset => 3,
), "open");
ok(my $size = $input->size, "size");
cmp_ok( $size, '==', 7, 'size ok' );
-foreach my $mfn ( 1 ... $size ) {
+foreach my $mfn ( 3 + 1 ... 3 + $size ) {
my $rec = $input->fetch;
ok($rec, "fetch $mfn");
cmp_ok($rec->{'000'}->[0], '==', $mfn, 'has mfn');
diag "rec: ", dump($rec), "\n" if $debug;
}
+ok( unlink $path, "unlink $path" );