subtest 'GetPatronInfo/GetBorrowerAttributes test for extended patron attributes' => sub {
- plan tests => 2;
+ plan tests => 4;
$schema->storage->txn_begin;
}
} );
- $builder->build(
+ my $fine = $builder->build(
{
source => 'Accountline',
value => {
$query->param( 'service', 'GetPatronInfo' );
$query->param( 'patron_id', $brwr->{'borrowernumber'} );
$query->param( 'show_attributes', '1' );
+ $query->param( 'show_fines', '1' );
my $reply = C4::ILSDI::Services::GetPatronInfo( $query );
is( $reply->{'charges'}, '10.00',
'The \'charges\' attribute should be correctly filled (bug 17836)' );
+ is( scalar( @{$reply->{fines}->{fine}}), 1, 'There should be only 1 account line');
+ is(
+ $reply->{fines}->{fine}->[0]->{accountlines_id},
+ $fine->{accountlines_id},
+ "The accountline should be the correct one"
+ );
+
# Check results:
is_deeply( $reply->{'attributes'}, [ $cmp ], 'Test GetPatronInfo - show_attributes parameter' );