@@ -, +, @@ Scary? Changed it myself. Reworded it a bit. Note that THE_notice is imo horrible :) Wont touch it though. But I think we should reword 'sent' since it just failed. And we actually should mock sending mail here. Adding FIXME. --- installer/data/mysql/atomicupdate/bug_25936.pl | 2 +- installer/data/mysql/en/mandatory/sample_notices.yml | 4 ++-- t/db_dependent/Koha/Patrons.t | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) --- a/installer/data/mysql/atomicupdate/bug_25936.pl +++ a/installer/data/mysql/atomicupdate/bug_25936.pl @@ -10,7 +10,7 @@ return { # Add PASSWORD_CHANGE notice $dbh->do( q{ INSERT IGNORE INTO letter (module, code, name, title, content, message_transport_type) VALUES ('members', 'PASSWORD_CHANGE', 'Notification of password change', 'Library account password change notification', - "Dear [% borrower.firstname %] [% borrower.surname %],\r\n\r\nSomeone has changed your library user account password.\r\n\r\nIf this is unexpected, please contact the library.", 'email'); + "Dear [% borrower.firstname %] [% borrower.surname %],\r\n\r\nWe want to notify you that your password has been changed. If you did not change it yourself (or requested that change), please contact library staff.\r\n\r\nYour library.", 'email'); }); # Add systempreference --- a/installer/data/mysql/en/mandatory/sample_notices.yml +++ a/installer/data/mysql/en/mandatory/sample_notices.yml @@ -1087,9 +1087,9 @@ tables: content: - "Dear [% patron.firstname %] [% patron.surname %]," - "" - - "Someone has changed your library user account password." + - "We want to notify you that your password has been changed. If you did not change it yourself (or requested that change), please contact library staff." - "" - - "If this is unexpected, please contact the library" + - "Your library." - module: members code: PASSWORD_RESET --- a/t/db_dependent/Koha/Patrons.t +++ a/t/db_dependent/Koha/Patrons.t @@ -2005,10 +2005,9 @@ subtest '->set_password' => sub { t::lib::Mocks::mock_preference( 'NotifyPasswordChange', 1 ); $patron->set_password({ password => 'abcd c' }); my $queued_notices = Koha::Notice::Messages->search({ borrowernumber => $patron->borrowernumber }); - is( $queued_notices->count, 1, "One notice queued when NotifyPassowrdChange enabled" ); + is( $queued_notices->count, 1, "One notice queued when NotifyPasswordChange enabled" ); my $THE_notice = $queued_notices->next; - is( $THE_notice->status, 'failed', "The notice was sent immediately"); - + is( $THE_notice->status, 'failed', "The notice was handled immediately and failed on wrong email address."); #FIXME Mock sending mail $schema->storage->txn_rollback; }; --