Bug 32394: Add tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b8e4d7d770)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2022-12-14 09:01:33 +01:00 committed by Martin Renvoize
parent 69a012a88f
commit 988c2abaf3
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F

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;