Lines 32-43
my $builder = t::lib::TestBuilder->new;
Link Here
|
32 |
|
32 |
|
33 |
subtest 'enqueue() tests' => sub { |
33 |
subtest 'enqueue() tests' => sub { |
34 |
|
34 |
|
35 |
plan tests => 5; |
35 |
plan tests => 6; |
36 |
|
36 |
|
37 |
$schema->storage->txn_begin; |
37 |
$schema->storage->txn_begin; |
38 |
|
38 |
|
39 |
my $biblio_ids = [ 1, 2 ]; |
39 |
my $biblio_ids = [ 1, 2 ]; |
40 |
|
40 |
|
|
|
41 |
t::lib::Mocks::mock_preference( 'RealTimeHoldsQueue', 0 ); |
42 |
is( |
43 |
Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue->new->enqueue( { biblio_ids => $biblio_ids } ), |
44 |
undef, 'No result when pref is off' |
45 |
); |
46 |
t::lib::Mocks::mock_preference( 'RealTimeHoldsQueue', 1 ); |
47 |
|
41 |
throws_ok |
48 |
throws_ok |
42 |
{ Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue->new->enqueue() } |
49 |
{ Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue->new->enqueue() } |
43 |
'Koha::Exceptions::MissingParameter', |
50 |
'Koha::Exceptions::MissingParameter', |
44 |
- |
|
|