Bug 19204: Add a test: holiday is expiration date
Sponsored-by: Goethe-Institut Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
e1676955f7
commit
59b2f2edb9
|
|
@ -1764,7 +1764,7 @@ subtest 'AddReturn + CumulativeRestrictionPeriods' => sub {
|
|||
};
|
||||
|
||||
subtest 'AddReturn + suspension_chargeperiod' => sub {
|
||||
plan tests => 10;
|
||||
plan tests => 12;
|
||||
|
||||
my $library = $builder->build( { source => 'Branch' } );
|
||||
my $patron = $builder->build( { source => 'Borrower', value => { categorycode => $patron_category->{categorycode} } } );
|
||||
|
|
@ -1895,6 +1895,26 @@ subtest 'AddReturn + suspension_chargeperiod' => sub {
|
|||
expiration_date => $expected_expiration,
|
||||
}
|
||||
);
|
||||
|
||||
# Adding another holiday, day of expiration date
|
||||
my $expected_expiration_dt = dt_from_string($expected_expiration);
|
||||
$calendar->insert_single_holiday(
|
||||
day => $expected_expiration_dt->day,
|
||||
month => $expected_expiration_dt->month,
|
||||
year => $expected_expiration_dt->year,
|
||||
title => 'holidayTest_exp',
|
||||
description => 'holidayDesc on expiration date'
|
||||
);
|
||||
# Expiration date will be the day after
|
||||
test_debarment_on_checkout(
|
||||
{
|
||||
item => $item_1,
|
||||
library => $library,
|
||||
patron => $patron,
|
||||
due_date => $five_days_ago,
|
||||
expiration_date => $expected_expiration_dt->clone->add( days => 1 ),
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
subtest 'AddReturn | is_overdue' => sub {
|
||||
|
|
|
|||
Loading…
Reference in New Issue