Bug 32394: Add tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
9810fc5e0e
commit
b8e4d7d770
1 changed files with 2 additions and 1 deletions
|
@ -69,7 +69,7 @@ subtest '_derived_class() tests' => sub {
|
||||||
|
|
||||||
subtest 'enqueue() tests' => sub {
|
subtest 'enqueue() tests' => sub {
|
||||||
|
|
||||||
plan tests => 7;
|
plan tests => 8;
|
||||||
|
|
||||||
$schema->storage->txn_begin;
|
$schema->storage->txn_begin;
|
||||||
|
|
||||||
|
@ -108,6 +108,7 @@ subtest 'enqueue() tests' => sub {
|
||||||
is( $job->size, 3, 'Three steps' );
|
is( $job->size, 3, 'Three steps' );
|
||||||
is( $job->status, 'new', 'Initial status set correctly' );
|
is( $job->status, 'new', 'Initial status set correctly' );
|
||||||
is( $job->borrowernumber, $patron->id, 'Borrowernumber set from userenv' );
|
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' );
|
is_deeply( $job->json->decode( $job->context ), $job_context, 'Context set from userenv + interface' );
|
||||||
|
|
||||||
$schema->storage->txn_rollback;
|
$schema->storage->txn_rollback;
|
||||||
|
|
Loading…
Reference in a new issue