Bug 32630: Add tests
prove t/db_dependent/Koha/ILL/Requests.t Sponsored-by: UKHSA - UK Health Security Agency Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk> Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
e95ec209c1
commit
ed349bad97
|
|
@ -1065,7 +1065,7 @@ subtest 'Backend core methods' => sub {
|
|||
|
||||
subtest 'Helpers' => sub {
|
||||
|
||||
plan tests => 25;
|
||||
plan tests => 26;
|
||||
|
||||
$schema->storage->txn_begin;
|
||||
|
||||
|
|
@ -1341,6 +1341,29 @@ Attribute: Pages=[% illrequestattributes.pages %]
|
|||
'appending to a note works'
|
||||
);
|
||||
|
||||
my $illrq_without_patron = $builder->build(
|
||||
{
|
||||
source => 'Illrequest',
|
||||
value => { branchcode => "HDE", borrowernumber => undef }
|
||||
}
|
||||
);
|
||||
my $illrq_obj_without_patron = Koha::ILL::Requests->find( $illrq_without_patron->{illrequest_id} );
|
||||
$illrq_obj_without_patron->_config($config);
|
||||
$illrq_obj_without_patron->_backend($backend);
|
||||
|
||||
my $get_notice_without_patron = $illrq_obj_without_patron->get_notice(
|
||||
{
|
||||
notice_code => 'ILL_REQUEST_CANCEL',
|
||||
transport => 'email'
|
||||
}
|
||||
);
|
||||
|
||||
is(
|
||||
$get_notice_without_patron->{lang},
|
||||
"default",
|
||||
'Koha::ILL::Request->get_notice lang correctly defaults to "default" for a request without a patron'
|
||||
);
|
||||
|
||||
$schema->storage->txn_rollback;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue