Bug 28787: Mock send_or_die

To make the tests pass even if no SMTP server is defined.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Sponsored-by: Rijksmuseum, Netherlands

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2022-07-08 09:05:26 +02:00 committed by Tomas Cohen Arazi
parent c52eb53c69
commit 2b4baae94a
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 5 additions and 0 deletions

View File

@ -36,6 +36,11 @@ t::lib::Mocks::mock_preference( 'SessionStorage', 'tmp' );
my $remote_address = '127.0.0.1';
my $t = Test::Mojo->new('Koha::REST::V1');
my $mocked_koha_email = Test::MockModule->new('Koha::Email');
$mocked_koha_email->mock( 'send_or_die', sub {
return 1;
});
subtest 'send_otp_token' => sub {
plan tests => 9;