|
Lines 7667-7673
subtest 'NoRefundOnLostFinesPaidAge' => sub {
Link Here
|
| 7667 |
}; |
7667 |
}; |
| 7668 |
|
7668 |
|
| 7669 |
subtest 'ChildNeedsGuarantor' => sub { |
7669 |
subtest 'ChildNeedsGuarantor' => sub { |
| 7670 |
plan tests => 18; |
7670 |
plan tests => 12; |
| 7671 |
|
7671 |
|
| 7672 |
t::lib::Mocks::mock_preference( 'ChildNeedsGuarantor', 0 ); |
7672 |
t::lib::Mocks::mock_preference( 'ChildNeedsGuarantor', 0 ); |
| 7673 |
my $library = $builder->build_object( { class => 'Koha::Libraries' } ); |
7673 |
my $library = $builder->build_object( { class => 'Koha::Libraries' } ); |
|
Lines 7745-7791
subtest 'ChildNeedsGuarantor' => sub {
Link Here
|
| 7745 |
library => $library->branchcode, |
7745 |
library => $library->branchcode, |
| 7746 |
} |
7746 |
} |
| 7747 |
); |
7747 |
); |
| 7748 |
warnings_like { |
|
|
| 7749 |
AddIssue( $child_patron, $item->barcode, undef ); |
| 7750 |
} |
| 7751 |
qr/Problem updating lastseen/, |
| 7752 |
"AddIssue generates a warning when Child type patron is missing a guarantor and ChildsNeedsGuarantor"; |
| 7753 |
warnings_like { |
| 7754 |
AddRenewal( |
| 7755 |
{ |
| 7756 |
borrowernumber => $child_patron->borrowernumber, itemnumber => $item->itemnumber, |
| 7757 |
branch => $library->branchcode |
| 7758 |
} |
| 7759 |
); |
| 7760 |
} |
| 7761 |
qr/Problem updating lastseen/, |
| 7762 |
"AddRenewal generates a warning when Child type patron is missing a guarantor and ChildNeedsGuarantor"; |
| 7763 |
warnings_like { |
| 7764 |
AddReturn( $item->barcode, $library->branchcode, undef, undef ); |
| 7765 |
} |
| 7766 |
qr/Problem updating lastseen/, |
| 7767 |
"AddReturn generates a warning when Child type patron is missing a guarantor and ChildNeedsGuarantor"; |
| 7768 |
|
| 7769 |
warnings_like { |
| 7770 |
AddIssue( $guarantee_patron, $item->barcode, undef ); |
| 7771 |
} |
| 7772 |
qr/Problem updating lastseen/, |
| 7773 |
"AddIssue generates a warning when can_be_guarantee type patron is missing a guarantor and ChildsNeedsGuarantor"; |
| 7774 |
warnings_like { |
| 7775 |
AddRenewal( |
| 7776 |
{ |
| 7777 |
borrowernumber => $guarantee_patron->borrowernumber, itemnumber => $item->itemnumber, |
| 7778 |
branch => $library->branchcode |
| 7779 |
} |
| 7780 |
); |
| 7781 |
} |
| 7782 |
qr/Problem updating lastseen/, |
| 7783 |
"AddRenewal generates a warning when can_be_guarantee type patron is missing a guarantor and ChildNeedsGuarantor"; |
| 7784 |
warnings_like { |
| 7785 |
AddReturn( $item->barcode, $library->branchcode, undef, undef ); |
| 7786 |
} |
| 7787 |
qr/Problem updating lastseen/, |
| 7788 |
"AddReturn generates a warning when can_be_guarantee type patron is missing a guarantor and ChildNeedsGuarantor"; |
| 7789 |
|
7748 |
|
| 7790 |
t::lib::Mocks::mock_preference( 'ChildNeedsGuarantor', 0 ); |
7749 |
t::lib::Mocks::mock_preference( 'ChildNeedsGuarantor', 0 ); |
| 7791 |
warnings_like { |
7750 |
warnings_like { |
| 7792 |
- |
|
|