Koha/t/lib/KohaTest/Circulation.pm
Galen Charlton 95889857c7 bug 2000 - add C4::Circulation::GetBranchBorrowerCircRule
This routine retrieves the branch/patron category circulation
rules for a given branch and patron category.  The return
value is a hashref containing the following key:

maxissueqty - maximum number of loans across all item types

This will first check for a specific branch and
category match from branch_borrower_circ_rules.

If no rule is found, it will then check default_branch_circ_rules
(same branch, default category).  If no rule is found,
it will then check default_borrower_circ_rules (default
branch, same category), then failing that, default_circ_rules
(default branch, default category).

If no rule has been found in the database, it will default to
the built in rule:

maxissueqty - undef

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-20 08:19:06 -05:00

55 lines
1.6 KiB
Perl

package KohaTest::Circulation;
use base qw( KohaTest );
use strict;
use warnings;
use Test::More;
use C4::Circulation;
sub testing_class { 'C4::Circulation' };
sub methods : Test( 1 ) {
my $self = shift;
my @methods = qw( barcodedecode
decode
transferbook
TooMany
itemissues
CanBookBeIssued
AddIssue
GetLoanLength
GetIssuingRule
GetBranchBorrowerCircRule
AddReturn
MarkIssueReturned
FixOverduesOnReturn
FixAccountForLostAndReturned
GetItemIssue
GetItemIssues
GetBiblioIssues
CanBookBeRenewed
AddRenewal
GetRenewCount
GetIssuingCharges
AddIssuingCharge
GetTransfers
GetTransfersFromTo
DeleteTransfer
AnonymiseIssueHistory
updateWrongTransfer
UpdateHoldingbranch
CalcDateDue
CheckValidDatedue
CheckRepeatableHolidays
CheckSpecialHolidays
CheckRepeatableSpecialHolidays
CheckValidBarcode
);
can_ok( $self->testing_class, @methods );
}
1;