Bug 40171: Add tests

prove t/db_dependent/Koha/ILL/Requests.t

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 46ffd07b85)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit ded9e8584d)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This commit is contained in:
Pedro Amorim 2025-07-17 08:32:25 +00:00 committed by Baptiste Wojtkowski
parent 5f492b1824
commit bd4a8ca6f7
No known key found for this signature in database
GPG Key ID: 47A8A13E10BC0D40
1 changed files with 9 additions and 1 deletions

View File

@ -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;
};