View | Details | Raw Unified | Return to bug 23104
Collapse All | Expand All

(-)a/t/db_dependent/Circulation/TooMany.t (-2 / +21 lines)
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 654-662 subtest 'General vs specific rules limit quantity correctly' => sub { Link Here
654
        undef,
654
        undef,
655
        'We are allowed one from the branch specifically now'
655
        'We are allowed one from the branch specifically now'
656
    );
656
    );
657
};
657
658
659
subtest 'empty string means unlimited' => sub {
660
    plan tests => 1;
658
661
662
    Koha::CirculationRules->set_rules(
663
        {
664
            branchcode   => '*',
665
            categorycode => '*',
666
            itemtype     => '*',
667
            rules        => {
668
                maxissueqty       => '',
669
                maxonsiteissueqty => 0,
670
            }
671
        },
672
    );
673
    is(
674
        C4::Circulation::TooMany( $patron, $biblio->{biblionumber}, $item ),
675
        undef,
676
        'maxissueqty="" should mean unlimited'
677
    );
659
678
679
    teardown();
660
};
680
};
661
681
662
$schema->storage->txn_rollback;
682
$schema->storage->txn_rollback;
663
- 

Return to bug 23104