From 8a3a9139c05a69e3fd28d3d7014d460d19fbff65 Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Fri, 23 Mar 2018 19:25:20 +0000 Subject: [PATCH] Bug 18570: Follow up to fix test noise This sets a valid email and changes the tests to expect it was sent. prove t/db_dependent/Passwordrecovery.t -- noise before patch -- no noise after patch --- t/db_dependent/Passwordrecovery.t | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/t/db_dependent/Passwordrecovery.t b/t/db_dependent/Passwordrecovery.t index dafe6b1..47de46f 100755 --- a/t/db_dependent/Passwordrecovery.t +++ b/t/db_dependent/Passwordrecovery.t @@ -51,7 +51,12 @@ my $uuid2 = "WXYZ0987"; my $uuid3 = "LMNO4561"; my $patron_category = $builder->build({ source => 'Category' }); -my $branch = $builder->build({ source => 'Branch' }); +my $branch = $builder->build({ + source => 'Branch', + value => { + branchreturnpath => $email1, + }, +}); $schema->resultset('BorrowerPasswordRecovery')->delete_all(); @@ -193,8 +198,8 @@ ok( $tempuuid1 ne $tempuuid2, "[SendPasswordRecoveryEmail] UPDATE == ON changes 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.' ); + ok( $letter->{status} eq 'sent', + 'Test SendPasswordRecoverEmail sent due to TestBuilder Sender being a valid email address as expected.' ); } $schema->storage->txn_rollback(); -- 2.1.4