Bug 32394: (follow-up) Add param for Koha::BackgroundJob::StageMARCForImport->enqueue
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 16 Dec 2022 12:00:45 +0000 (09:00 -0300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 16 Dec 2022 12:00:45 +0000 (09:00 -0300)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/BackgroundJob/StageMARCForImport.pm
t/db_dependent/Koha/BackgroundJob/StageMARCForImport.t

index 423bc64..7858eae 100644 (file)
@@ -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,
index 51a2397..1a8e0b4 100755 (executable)
@@ -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' );