diff --git a/t/db_dependent/Koha/ILL/Requests.t b/t/db_dependent/Koha/ILL/Requests.t index 29e368ba98..00dbcf76dd 100755 --- a/t/db_dependent/Koha/ILL/Requests.t +++ b/t/db_dependent/Koha/ILL/Requests.t @@ -1117,7 +1117,7 @@ subtest 'Backend core methods' => sub { subtest 'Helpers' => sub { - plan tests => 26; + plan tests => 27; $schema->storage->txn_begin; @@ -1416,6 +1416,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; };