|
Lines 15-21
Link Here
|
| 15 |
# with Koha; if not, see <http://www.gnu.org/licenses>. |
15 |
# with Koha; if not, see <http://www.gnu.org/licenses>. |
| 16 |
|
16 |
|
| 17 |
use Modern::Perl; |
17 |
use Modern::Perl; |
| 18 |
use Test::More tests => 8; |
18 |
use Test::More tests => 9; |
| 19 |
use C4::Context; |
19 |
use C4::Context; |
| 20 |
|
20 |
|
| 21 |
use C4::Members; |
21 |
use C4::Members; |
|
Lines 658-666
subtest 'General vs specific rules limit quantity correctly' => sub {
Link Here
|
| 658 |
undef, |
658 |
undef, |
| 659 |
'We are allowed one from the branch specifically now' |
659 |
'We are allowed one from the branch specifically now' |
| 660 |
); |
660 |
); |
|
|
661 |
}; |
| 661 |
|
662 |
|
|
|
663 |
subtest 'empty string means unlimited' => sub { |
| 664 |
plan tests => 1; |
| 662 |
|
665 |
|
|
|
666 |
Koha::CirculationRules->set_rules( |
| 667 |
{ |
| 668 |
branchcode => '*', |
| 669 |
categorycode => '*', |
| 670 |
itemtype => '*', |
| 671 |
rules => { |
| 672 |
maxissueqty => '', |
| 673 |
maxonsiteissueqty => 0, |
| 674 |
} |
| 675 |
}, |
| 676 |
); |
| 677 |
is( |
| 678 |
C4::Circulation::TooMany( $patron, $biblio->{biblionumber}, $item ), |
| 679 |
undef, |
| 680 |
'maxissueqty="" should mean unlimited' |
| 681 |
); |
| 663 |
|
682 |
|
|
|
683 |
teardown(); |
| 664 |
}; |
684 |
}; |
| 665 |
|
685 |
|
| 666 |
$schema->storage->txn_rollback; |
686 |
$schema->storage->txn_rollback; |
| 667 |
- |
|
|