kshell
prove -v t/db_dependent/Passwordrecovery.t
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
use Koha::Patrons;
use t::lib::TestBuilder;
-use Test::More tests => 18;
+use Test::More tests => 20;
use_ok('Koha::Patron::Password::Recovery');
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();