Bug 33146: Unit tests
[koha-ffzg.git] / t / db_dependent / Passwordrecovery.t
index 0eabc80..02001a9 100755 (executable)
 use Modern::Perl;
 
 use C4::Context;
-use Mail::Sendmail;
-use C4::Letters;
+use C4::Letters qw( GetQueuedMessages );
 use Koha::Database;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string );
 use Koha::Patrons;
 
 use t::lib::TestBuilder;
@@ -201,7 +200,7 @@ ok( Koha::Patron::Password::Recovery::DeleteExpiredPasswordRecovery($borrowernum
 my $borrower = Koha::Patrons->search( { userid => $userid1 } )->next;
 my $success;
 warning_is {
-    $success = Koha::Patron::Password::Recovery::SendPasswordRecoveryEmail($borrower, $email1, 0); }
+    $success = Koha::Patron::Password::Recovery::SendPasswordRecoveryEmail($borrower, $email1 ); }
     "Fake sendmail",
     '[SendPasswordRecoveryEmail] expecting fake sendmail';
 ok( $success == 1, '[SendPasswordRecoveryEmail] Returns 1 on success');
@@ -213,7 +212,7 @@ my $bpr = $schema->resultset('BorrowerPasswordRecovery')->search( { borrowernumb
 my $tempuuid1 = $bpr->next->uuid;
 
 warning_is {
-    Koha::Patron::Password::Recovery::SendPasswordRecoveryEmail($borrower, $email1, 1); }
+    Koha::Patron::Password::Recovery::SendPasswordRecoveryEmail($borrower, $email1 ); }
     "Fake sendmail",
     '[SendPasswordRecoveryEmail] expecting fake sendmail';