Bug 32394: Add tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2022-12-14 09:01:33 +01:00 committed by Tomas Cohen Arazi
parent 9810fc5e0e
commit b8e4d7d770
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -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;