Bug 35962: (bug 35843 follow-up 2) Fix BackgroundJob.t on D10

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2024-02-06 08:32:31 +01:00
parent 12b6c0e67d
commit d130a6c66b
Signed by: jonathan.druart
GPG key ID: A085E712BEF0E0F0

View file

@ -80,7 +80,8 @@ subtest 'enqueue() tests' => sub {
'Enqueue BatchUpdateItem without data throws exception';
# The following test needs a mock to trigger the exception
my $mock = Test::MockModule->new('Net::Stomp')->mock( 'send_with_receipt', sub { 0 } );
my $mock = Test::MockModule->new('Net::Stomp');
$mock->mock( 'send_with_receipt', sub { 0 } );
throws_ok { Koha::BackgroundJob::MARCImportCommitBatch->new->enqueue }
'Koha::Exceptions::BackgroundJob',
'Enqueue MARCImportCommitBatch with mock throws exception';