From 4ee113cc44ff0c33885ae64d4dcc2d88a0c3261a Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 27 Mar 2018 12:21:41 -0300 Subject: [PATCH] Bug 20474: Mimick Letters.t Please improve if needed the 2 occurrences on a separate bug reports. Signed-off-by: Jonathan Druart --- t/db_dependent/Passwordrecovery.t | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/t/db_dependent/Passwordrecovery.t b/t/db_dependent/Passwordrecovery.t index 75760f4ccb..37f5ca9658 100755 --- a/t/db_dependent/Passwordrecovery.t +++ b/t/db_dependent/Passwordrecovery.t @@ -34,7 +34,7 @@ my $module = Test::MockModule->new('Mail::Sendmail'); $module->mock( 'sendmail', sub { - carp 'Fake sendmail!'; + carp 'Fake sendmail'; %mail = @_; } ); @@ -195,9 +195,9 @@ ok( Koha::Patron::Password::Recovery::DeleteExpiredPasswordRecovery($borrowernum my $borrower = Koha::Patrons->search( { userid => $userid1 } )->next; my $success; -warning_like { +warning_is { $success = Koha::Patron::Password::Recovery::SendPasswordRecoveryEmail($borrower, $email1, 0); } - qr/Fake sendmail!/, + "Fake sendmail", '[SendPasswordRecoveryEmail] expecting fake sendmail'; ok( $success == 1, '[SendPasswordRecoveryEmail] Returns 1 on success'); @@ -207,9 +207,9 @@ ok( scalar @$letters == 1, "[SendPasswordRecoveryEmail] There is a letter in the my $bpr = $schema->resultset('BorrowerPasswordRecovery')->search( { borrowernumber => $borrowernumber1 } ); my $tempuuid1 = $bpr->next->uuid; -warning_like { +warning_is { Koha::Patron::Password::Recovery::SendPasswordRecoveryEmail($borrower, $email1, 1); } - qr/Fake sendmail!/, + "Fake sendmail", '[SendPasswordRecoveryEmail] expecting fake sendmail'; $bpr = $schema->resultset('BorrowerPasswordRecovery')->search( { borrowernumber => $borrowernumber1 } ); -- 2.11.0