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:
parent
c52eb53c69
commit
2b4baae94a
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue