From 73c21c4d30539371bb255346384bfa9f7cd945f8 Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Wed, 7 Mar 2018 23:59:54 +0000 Subject: [PATCH] Bug 18570: Tests to prove if email send was attempted kshell prove -v t/db_dependent/Passwordrecovery.t Signed-off-by: Josef Moravec Signed-off-by: Julian Maurice Signed-off-by: Jonathan Druart --- t/db_dependent/Passwordrecovery.t | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Passwordrecovery.t b/t/db_dependent/Passwordrecovery.t index f11893fcdd..dafe6b11b5 100755 --- a/t/db_dependent/Passwordrecovery.t +++ b/t/db_dependent/Passwordrecovery.t @@ -23,7 +23,7 @@ use Koha::Database; use Koha::Patrons; use t::lib::TestBuilder; -use Test::More tests => 18; +use Test::More tests => 20; use_ok('Koha::Patron::Password::Recovery'); @@ -192,5 +192,10 @@ $letters = C4::Letters::GetQueuedMessages( { borrowernumber => $borrowernumber1, ok( $tempuuid1 ne $tempuuid2, "[SendPasswordRecoveryEmail] UPDATE == ON changes uuid in the database and updates the expirydate"); ok( scalar @$letters == 2, "[SendPasswordRecoveryEmail] UPDATE == ON sends a new letter with updated uuid"); +foreach my $letter (@$letters) { + ok( $letter->{status} eq 'failed', + 'Test SendPasswordRecoverEmail failed due to TestBuilder Sender not being a valid email address as expected.' ); +} + $schema->storage->txn_rollback(); -- 2.11.4.GIT