Lines 4606-4612
subtest 'AddRenewal and AddIssuingCharge tests' => sub {
Link Here
|
4606 |
}; |
4606 |
}; |
4607 |
|
4607 |
|
4608 |
subtest 'AddRenewal() adds to renewals' => sub { |
4608 |
subtest 'AddRenewal() adds to renewals' => sub { |
4609 |
plan tests => 4; |
4609 |
plan tests => 5; |
4610 |
|
4610 |
|
4611 |
my $library = $builder->build_object({ class => 'Koha::Libraries' }); |
4611 |
my $library = $builder->build_object({ class => 'Koha::Libraries' }); |
4612 |
my $patron = $builder->build_object({ |
4612 |
my $patron = $builder->build_object({ |
Lines 4623-4629
subtest 'AddRenewal() adds to renewals' => sub {
Link Here
|
4623 |
is(ref($issue), 'Koha::Checkout', 'Issue added'); |
4623 |
is(ref($issue), 'Koha::Checkout', 'Issue added'); |
4624 |
|
4624 |
|
4625 |
# Renew item |
4625 |
# Renew item |
4626 |
my $duedate = AddRenewal( $patron->id, $item->id, $library->id ); |
4626 |
my $duedate = AddRenewal( $patron->id, $item->id, $library->id, undef, undef, undef, undef, 1 ); |
4627 |
|
4627 |
|
4628 |
ok( $duedate, "Renewal added" ); |
4628 |
ok( $duedate, "Renewal added" ); |
4629 |
|
4629 |
|
Lines 4631-4636
subtest 'AddRenewal() adds to renewals' => sub {
Link Here
|
4631 |
is($renewals->count, 1, 'One renewal added'); |
4631 |
is($renewals->count, 1, 'One renewal added'); |
4632 |
my $THE_renewal = $renewals->next; |
4632 |
my $THE_renewal = $renewals->next; |
4633 |
is( $THE_renewal->renewer_id, C4::Context->userenv->{'number'}, 'Renewer recorded from context' ); |
4633 |
is( $THE_renewal->renewer_id, C4::Context->userenv->{'number'}, 'Renewer recorded from context' ); |
|
|
4634 |
is( $THE_renewal->renewal_type, 'Automatic', 'AddRenewal "automatic" parameter sets renewal type to "Automatic"'); |
4634 |
}; |
4635 |
}; |
4635 |
|
4636 |
|
4636 |
subtest 'ProcessOfflinePayment() tests' => sub { |
4637 |
subtest 'ProcessOfflinePayment() tests' => sub { |
4637 |
- |
|
|