Bug 23104: Add tests
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1521a5567e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
b57aaed3ff
commit
2def4aee18
|
|
@ -15,7 +15,7 @@
|
|||
# with Koha; if not, see <http://www.gnu.org/licenses>.
|
||||
|
||||
use Modern::Perl;
|
||||
use Test::More tests => 8;
|
||||
use Test::More tests => 9;
|
||||
use C4::Context;
|
||||
|
||||
use C4::Members;
|
||||
|
|
@ -658,9 +658,29 @@ subtest 'General vs specific rules limit quantity correctly' => sub {
|
|||
undef,
|
||||
'We are allowed one from the branch specifically now'
|
||||
);
|
||||
};
|
||||
|
||||
subtest 'empty string means unlimited' => sub {
|
||||
plan tests => 1;
|
||||
|
||||
Koha::CirculationRules->set_rules(
|
||||
{
|
||||
branchcode => '*',
|
||||
categorycode => '*',
|
||||
itemtype => '*',
|
||||
rules => {
|
||||
maxissueqty => '',
|
||||
maxonsiteissueqty => 0,
|
||||
}
|
||||
},
|
||||
);
|
||||
is(
|
||||
C4::Circulation::TooMany( $patron, $biblio->{biblionumber}, $item ),
|
||||
undef,
|
||||
'maxissueqty="" should mean unlimited'
|
||||
);
|
||||
|
||||
teardown();
|
||||
};
|
||||
|
||||
$schema->storage->txn_rollback;
|
||||
|
|
|
|||
Loading…
Reference in New Issue