From 3dcdd6db788b2c23320ca24a900d37d0454dbbec Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 16 Dec 2022 09:00:45 -0300 Subject: [PATCH] Bug 32394: (follow-up) Add param for Koha::BackgroundJob::StageMARCForImport->enqueue Signed-off-by: Tomas Cohen Arazi --- Koha/BackgroundJob/StageMARCForImport.pm | 1 + t/db_dependent/Koha/BackgroundJob/StageMARCForImport.t | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Koha/BackgroundJob/StageMARCForImport.pm b/Koha/BackgroundJob/StageMARCForImport.pm index 423bc64bb5..7858eae7a0 100644 --- a/Koha/BackgroundJob/StageMARCForImport.pm +++ b/Koha/BackgroundJob/StageMARCForImport.pm @@ -196,6 +196,7 @@ Enqueue the new job sub enqueue { my ( $self, $args) = @_; + # FIXME: no $args validation $self->SUPER::enqueue({ job_size => 0, # TODO Unknown for now? job_args => $args, diff --git a/t/db_dependent/Koha/BackgroundJob/StageMARCForImport.t b/t/db_dependent/Koha/BackgroundJob/StageMARCForImport.t index 51a23973f2..1a8e0b495f 100755 --- a/t/db_dependent/Koha/BackgroundJob/StageMARCForImport.t +++ b/t/db_dependent/Koha/BackgroundJob/StageMARCForImport.t @@ -35,7 +35,7 @@ subtest 'enqueue() tests' => sub { $schema->storage->txn_begin; - my $job_id = Koha::BackgroundJob::StageMARCForImport->new->enqueue(); + my $job_id = Koha::BackgroundJob::StageMARCForImport->new->enqueue({}); my $job = Koha::BackgroundJobs->find($job_id)->_derived_class; is( $job->size, 0, 'Size is correct' ); -- 2.39.5