Bug 32394: Add tests
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 14 Dec 2022 08:01:33 +0000 (09:01 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 15 Dec 2022 13:55:36 +0000 (13:55 +0000)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b8e4d7d7706fc129985f9a3dc2da550625941dbe)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
t/db_dependent/Koha/BackgroundJob.t

index 80674fb..4f1f4d9 100755 (executable)
@@ -69,7 +69,7 @@ subtest '_derived_class() tests' => sub {
 
 subtest 'enqueue() tests' => sub {
 
-    plan tests => 7;
+    plan tests => 8;
 
     $schema->storage->txn_begin;
 
@@ -108,6 +108,7 @@ subtest 'enqueue() tests' => sub {
     is( $job->size,           3,           'Three steps' );
     is( $job->status,         'new',       'Initial status set correctly' );
     is( $job->borrowernumber, $patron->id, 'Borrowernumber set from userenv' );
+    is( $job->queue,          'long_tasks', 'BatchUpdateItem should use the long_tasks queue' );
     is_deeply( $job->json->decode( $job->context ), $job_context, 'Context set from userenv + interface' );
 
     $schema->storage->txn_rollback;