From 640814c4cfc95ee06e1ffaa394f0f952a1e78056 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 30 Sep 2022 06:26:44 +0000 Subject: [PATCH] Bug 25936: (QA follow-up) Spelling and wording [1] NotifyPassowrdChange => NotifyPasswordChange [2] Someone has changed your library user account password. Scary? Changed it myself. Reworded it a bit. [3] is( $THE_notice->status, 'failed', "The notice was sent immediately"); 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. Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi --- 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(-) diff --git a/installer/data/mysql/atomicupdate/bug_25936.pl b/installer/data/mysql/atomicupdate/bug_25936.pl index 973fd232e1..56970ed02a 100755 --- a/installer/data/mysql/atomicupdate/bug_25936.pl +++ b/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 diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml index 935f5bae65..a98e6a1dd7 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.yml +++ b/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 diff --git a/t/db_dependent/Koha/Patrons.t b/t/db_dependent/Koha/Patrons.t index 7a2f4597bf..ad8e7e58f7 100755 --- a/t/db_dependent/Koha/Patrons.t +++ b/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; }; -- 2.39.5