Lines 262-268
my $patron4 = Koha::Patron->new(
Link Here
|
262 |
)->store; |
262 |
)->store; |
263 |
|
263 |
|
264 |
my $account = $patron4->account; |
264 |
my $account = $patron4->account; |
265 |
my $line1 = $account->add_debit({ type => 'ACCOUNT', amount => 10, interface => 'commandline' }); |
265 |
my $line1 = $account->add_debit( { type => 'ACCOUNT', amount => 10, interface => 'commandline' } ); |
266 |
|
266 |
|
267 |
Koha::Patron::Debarments::AddDebarment( |
267 |
Koha::Patron::Debarments::AddDebarment( |
268 |
{ |
268 |
{ |
Lines 286-296
$restrictions = $patron4->restrictions;
Link Here
|
286 |
|
286 |
|
287 |
is( $restrictions->count, 2, "->restrictions returns 2 restrictions before payment" ); |
287 |
is( $restrictions->count, 2, "->restrictions returns 2 restrictions before payment" ); |
288 |
|
288 |
|
289 |
$account->pay({amount => 5}); |
289 |
$account->pay( { amount => 5 } ); |
290 |
$restrictions = $patron4->restrictions; |
290 |
$restrictions = $patron4->restrictions; |
291 |
is( $restrictions->count, 1, "->restrictions returns 1 restriction after paying half of the fee" ); |
291 |
is( $restrictions->count, 1, "->restrictions returns 1 restriction after paying half of the fee" ); |
292 |
is( $restrictions->next->type->code, "TEST2", "Restriction left has type value 'TEST2'" ); |
292 |
is( $restrictions->next->type->code, "TEST2", "Restriction left has type value 'TEST2'" ); |
293 |
|
293 |
|
294 |
$account->pay({amount => 5}); |
294 |
$account->pay( { amount => 5 } ); |
295 |
$restrictions = $patron4->restrictions; |
295 |
$restrictions = $patron4->restrictions; |
296 |
is( $restrictions->count, 0, "->restrictions returns 0 restrictions after paying all fees" ); |
296 |
is( $restrictions->count, 0, "->restrictions returns 0 restrictions after paying all fees" ); |
297 |
- |
|
|