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

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d7669ae2a9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Jonathan Druart 2024-01-31 16:44:47 +01:00 committed by Fridolin Somers
parent 7e8c7c4773
commit 715bc1e182
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ 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', 0 );
my $mock = Test::MockModule->new('Net::Stomp')->mock( 'send_with_receipt', sub { 0 } );
throws_ok { Koha::BackgroundJob::MARCImportCommitBatch->new->enqueue }
'Koha::Exceptions::BackgroundJob',
'Enqueue MARCImportCommitBatch with mock throws exception';