Lines 18-24
Link Here
|
18 |
|
18 |
|
19 |
use Modern::Perl; |
19 |
use Modern::Perl; |
20 |
|
20 |
|
21 |
use Test::More tests => 8; |
21 |
use Test::More tests => 9; |
22 |
use Test::MockModule; |
22 |
use Test::MockModule; |
23 |
use Test::Warn; |
23 |
use Test::Warn; |
24 |
|
24 |
|
Lines 291-296
subtest "makepartialpayment() tests" => sub {
Link Here
|
291 |
} |
291 |
} |
292 |
}; |
292 |
}; |
293 |
|
293 |
|
|
|
294 |
subtest "makepartialpayment() tests" => sub { |
295 |
|
296 |
plan tests => 1; |
297 |
|
298 |
my $categorycode = $builder->build( { source => 'Category' } )->{categorycode}; |
299 |
|
300 |
my $borrower = Koha::Borrower->new( |
301 |
{ |
302 |
surname => 'Hall', |
303 |
firstname => 'Kyle', |
304 |
categorycode => $categorycode, |
305 |
branchcode => $branchcode, |
306 |
} |
307 |
)->store(); |
308 |
|
309 |
my $sth = $dbh->prepare( |
310 |
q{ |
311 |
INSERT INTO accountlines ( |
312 |
borrowernumber , |
313 |
accountno , |
314 |
itemnumber , |
315 |
date , |
316 |
amount , |
317 |
description , |
318 |
dispute , |
319 |
accounttype , |
320 |
amountoutstanding , |
321 |
lastincrement , |
322 |
timestamp , |
323 |
notify_id , |
324 |
notify_level , |
325 |
note , |
326 |
manager_id |
327 |
) |
328 |
VALUES |
329 |
( ?, '32766', NULL , '2013-07-31', '1.000000', NULL , NULL , NULL , '1.000000', NULL , '2013-07-31 10:21:01', '0', '0', NULL , NULL), |
330 |
( ?, '32767', NULL , '2013-07-31', '2.000000', NULL , NULL , NULL , '2.000000', NULL , '2013-07-31 10:21:01', '0', '0', NULL , NULL) |
331 |
} |
332 |
); |
333 |
$sth->execute( $borrower->borrowernumber, $borrower->borrowernumber ); |
334 |
|
335 |
ok( GetTotalFines( $borrower->borrowernumber ) == 3, "GetTotalFines functions correctly" ); |
336 |
}; |
337 |
|
294 |
$dbh->rollback; |
338 |
$dbh->rollback; |
295 |
|
339 |
|
296 |
1; |
340 |
1; |
297 |
- |
341 |
|