Bug 35659: (QA follow-up) Fix t/db_dependent/Koha/OAIHarvester.t

Previously, this test just checked the last 1 day of bib activity,
but on a fresh test system there will be no activity, so it will always
fail.

Instead, let's just check that a number is returned for the total,
even if that total number is 0, since 0 is a valid response too.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
David Cook 2024-10-29 00:43:32 +00:00 committed by Katrin Fischer
parent 624e8f1bb8
commit e7ae98af67
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 3 additions and 2 deletions

View File

@ -20,7 +20,8 @@
use Modern::Perl;
use Test::More tests => 28;
use Test::Exception;
use File::Temp qw/tempfile/;
use File::Temp qw/tempfile/;
use Scalar::Util qw//;
use t::lib::TestBuilder;
use t::lib::Mocks;
@ -66,7 +67,7 @@ like(
'Got list of supported metadata formats'
);
is( $init_results->{is_error}, undef, 'ListRecords request worked' );
cmp_ok( $init_results->{total}, '>', 0, 'Records have been processed' );
ok( Scalar::Util::looks_like_number( $init_results->{total} ), 'Total records fetched' );
isnt( $init_results->{letter_message_id}, undef, 'Report has been enqueued' );
my $record =