|
Lines 4614-4620
subtest 'AddRenewal and AddIssuingCharge tests' => sub {
Link Here
|
| 4614 |
}; |
4614 |
}; |
| 4615 |
|
4615 |
|
| 4616 |
subtest 'AddRenewal() adds to renewals' => sub { |
4616 |
subtest 'AddRenewal() adds to renewals' => sub { |
| 4617 |
plan tests => 4; |
4617 |
plan tests => 5; |
| 4618 |
|
4618 |
|
| 4619 |
my $library = $builder->build_object({ class => 'Koha::Libraries' }); |
4619 |
my $library = $builder->build_object({ class => 'Koha::Libraries' }); |
| 4620 |
my $patron = $builder->build_object({ |
4620 |
my $patron = $builder->build_object({ |
|
Lines 4631-4637
subtest 'AddRenewal() adds to renewals' => sub {
Link Here
|
| 4631 |
is(ref($issue), 'Koha::Checkout', 'Issue added'); |
4631 |
is(ref($issue), 'Koha::Checkout', 'Issue added'); |
| 4632 |
|
4632 |
|
| 4633 |
# Renew item |
4633 |
# Renew item |
| 4634 |
my $duedate = AddRenewal( $patron->id, $item->id, $library->id ); |
4634 |
my $duedate = AddRenewal( $patron->id, $item->id, $library->id, undef, undef, undef, undef, 1 ); |
| 4635 |
|
4635 |
|
| 4636 |
ok( $duedate, "Renewal added" ); |
4636 |
ok( $duedate, "Renewal added" ); |
| 4637 |
|
4637 |
|
|
Lines 4639-4644
subtest 'AddRenewal() adds to renewals' => sub {
Link Here
|
| 4639 |
is($renewals->count, 1, 'One renewal added'); |
4639 |
is($renewals->count, 1, 'One renewal added'); |
| 4640 |
my $THE_renewal = $renewals->next; |
4640 |
my $THE_renewal = $renewals->next; |
| 4641 |
is( $THE_renewal->renewer_id, C4::Context->userenv->{'number'}, 'Renewer recorded from context' ); |
4641 |
is( $THE_renewal->renewer_id, C4::Context->userenv->{'number'}, 'Renewer recorded from context' ); |
|
|
4642 |
is( $THE_renewal->renewal_type, 'Automatic', 'AddRenewal "automatic" parameter sets renewal type to "Automatic"'); |
| 4642 |
}; |
4643 |
}; |
| 4643 |
|
4644 |
|
| 4644 |
subtest 'ProcessOfflinePayment() tests' => sub { |
4645 |
subtest 'ProcessOfflinePayment() tests' => sub { |
| 4645 |
- |
|
|