|
Lines 661-667
subtest 'General vs specific rules limit quantity correctly' => sub {
Link Here
|
| 661 |
}; |
661 |
}; |
| 662 |
|
662 |
|
| 663 |
subtest 'empty string means unlimited' => sub { |
663 |
subtest 'empty string means unlimited' => sub { |
| 664 |
plan tests => 1; |
664 |
plan tests => 2; |
| 665 |
|
665 |
|
| 666 |
Koha::CirculationRules->set_rules( |
666 |
Koha::CirculationRules->set_rules( |
| 667 |
{ |
667 |
{ |
|
Lines 670-676
subtest 'empty string means unlimited' => sub {
Link Here
|
| 670 |
itemtype => '*', |
670 |
itemtype => '*', |
| 671 |
rules => { |
671 |
rules => { |
| 672 |
maxissueqty => '', |
672 |
maxissueqty => '', |
| 673 |
maxonsiteissueqty => 0, |
673 |
maxonsiteissueqty => '', |
| 674 |
} |
674 |
} |
| 675 |
}, |
675 |
}, |
| 676 |
); |
676 |
); |
|
Lines 680-685
subtest 'empty string means unlimited' => sub {
Link Here
|
| 680 |
'maxissueqty="" should mean unlimited' |
680 |
'maxissueqty="" should mean unlimited' |
| 681 |
); |
681 |
); |
| 682 |
|
682 |
|
|
|
683 |
is( |
| 684 |
C4::Circulation::TooMany( $patron, $biblio->{biblionumber}, $item, { onsite_checkout => 1 } ), |
| 685 |
undef, |
| 686 |
'maxonsiteissueqty="" should mean unlimited' |
| 687 |
); |
| 688 |
|
| 683 |
teardown(); |
689 |
teardown(); |
| 684 |
}; |
690 |
}; |
| 685 |
|
691 |
|
| 686 |
- |
|
|