From bd4a8ca6f7c00ab934dee00a1b58357d04e00014 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Thu, 17 Jul 2025 08:32:25 +0000 Subject: [PATCH] Bug 40171: Add tests prove t/db_dependent/Koha/ILL/Requests.t Signed-off-by: Lucas Gass (cherry picked from commit 46ffd07b8501b448bda7456f3a0c1d7ad67a1f00) Signed-off-by: Paul Derscheid (cherry picked from commit ded9e8584d6eed17363e9d812d7f5cb82a386ee6) Signed-off-by: Baptiste Wojtkowski --- t/db_dependent/Koha/ILL/Requests.t | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Koha/ILL/Requests.t b/t/db_dependent/Koha/ILL/Requests.t index a713800c2b..c8b208edc5 100755 --- a/t/db_dependent/Koha/ILL/Requests.t +++ b/t/db_dependent/Koha/ILL/Requests.t @@ -904,7 +904,7 @@ subtest 'Backend core methods' => sub { subtest 'Helpers' => sub { - plan tests => 26; + plan tests => 27; $schema->storage->txn_begin; @@ -1172,6 +1172,14 @@ Attribute: Pages=[% illrequestattributes.pages %] 'Koha::ILL::Request->get_notice lang correctly defaults to "default" for a request without a patron' ); + Koha::Patron::MessagePreference::Attributes->delete(); + my $no_message_preferences_return = $illrq_obj->send_patron_notice('ILL_PICKUP_READY'); + is_deeply( + $no_message_preferences_return, + { result => { fail => [ 'email', 'sms' ], success => [] } }, + "Correct error when patron has no message preferences" + ); + $schema->storage->txn_rollback; };