Bug 12596 - Unit Test

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 90328d0811)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Conflicts:
	t/db_dependent/Circulation.t
This commit is contained in:
Kyle M Hall 2014-07-17 12:17:48 -04:00 committed by Fridolin Somers
parent 3d8e056019
commit 7aa79b8713
1 changed files with 8 additions and 1 deletions

View File

@ -8,8 +8,9 @@ use C4::Branch;
use C4::Items;
use C4::Members;
use C4::Reserves;
use Koha::DateUtils;
use Test::More tests => 45;
use Test::More tests => 46;
BEGIN {
use_ok('C4::Circulation');
@ -347,6 +348,12 @@ C4::Context->dbh->do("DELETE FROM accountlines");
);
ok( $total_due == 15, 'Borrower only charged fine with both WhenLostForgiveFine and WhenLostChargeReplacementFee disabled' );
my $now = dt_from_string();
my $future = dt_from_string();
$future->add( days => 7 );
my $units = C4::Overdues::_get_chargeable_units('days', $future, $now, 'MPL');
ok( $units == 0, '_get_chargeable_units returns 0 for items not past due date' );
}
{