From a227090c7d286bd03ac3431c1477fb450792c208 Mon Sep 17 00:00:00 2001 From: David Cook Date: Tue, 29 Oct 2024 00:43:32 +0000 Subject: [PATCH] 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. --- t/db_dependent/Koha/OAIHarvester.t | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Koha/OAIHarvester.t b/t/db_dependent/Koha/OAIHarvester.t index 1a64ed22e2..24c6b7979a 100755 --- a/t/db_dependent/Koha/OAIHarvester.t +++ b/t/db_dependent/Koha/OAIHarvester.t @@ -21,6 +21,7 @@ use Modern::Perl; use Test::More tests => 28; use Test::Exception; 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 = -- 2.39.2