Bugzilla – Attachment 73324 Details for
Bug 20474
Passwordrecovery.t should mock Mail::Sendmail::sendmail
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20474: Mimick Letters.t
Bug-20474-Mimick-Letterst.patch (text/plain), 1.93 KB, created by
Jonathan Druart
on 2018-03-27 15:24:08 UTC
(
hide
)
Description:
Bug 20474: Mimick Letters.t
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-03-27 15:24:08 UTC
Size:
1.93 KB
patch
obsolete
>From 4ee113cc44ff0c33885ae64d4dcc2d88a0c3261a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >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 <jonathan.druart@bugs.koha-community.org> >--- > 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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20474
:
73288
|
73289
|
73322
|
73323
| 73324