|
Lines 103-109
subtest 'AuthenticatePatron test' => sub {
Link Here
|
| 103 |
|
103 |
|
| 104 |
subtest 'GetPatronInfo/GetBorrowerAttributes test for extended patron attributes' => sub { |
104 |
subtest 'GetPatronInfo/GetBorrowerAttributes test for extended patron attributes' => sub { |
| 105 |
|
105 |
|
| 106 |
plan tests => 2; |
106 |
plan tests => 4; |
| 107 |
|
107 |
|
| 108 |
$schema->storage->txn_begin; |
108 |
$schema->storage->txn_begin; |
| 109 |
|
109 |
|
|
Lines 191-197
subtest 'GetPatronInfo/GetBorrowerAttributes test for extended patron attributes
Link Here
|
| 191 |
} |
191 |
} |
| 192 |
} ); |
192 |
} ); |
| 193 |
|
193 |
|
| 194 |
$builder->build( |
194 |
my $fine = $builder->build( |
| 195 |
{ |
195 |
{ |
| 196 |
source => 'Accountline', |
196 |
source => 'Accountline', |
| 197 |
value => { |
197 |
value => { |
|
Lines 208-213
subtest 'GetPatronInfo/GetBorrowerAttributes test for extended patron attributes
Link Here
|
| 208 |
$query->param( 'service', 'GetPatronInfo' ); |
208 |
$query->param( 'service', 'GetPatronInfo' ); |
| 209 |
$query->param( 'patron_id', $brwr->{'borrowernumber'} ); |
209 |
$query->param( 'patron_id', $brwr->{'borrowernumber'} ); |
| 210 |
$query->param( 'show_attributes', '1' ); |
210 |
$query->param( 'show_attributes', '1' ); |
|
|
211 |
$query->param( 'show_fines', '1' ); |
| 211 |
|
212 |
|
| 212 |
my $reply = C4::ILSDI::Services::GetPatronInfo( $query ); |
213 |
my $reply = C4::ILSDI::Services::GetPatronInfo( $query ); |
| 213 |
|
214 |
|
|
Lines 225-230
subtest 'GetPatronInfo/GetBorrowerAttributes test for extended patron attributes
Link Here
|
| 225 |
is( $reply->{'charges'}, '10.00', |
226 |
is( $reply->{'charges'}, '10.00', |
| 226 |
'The \'charges\' attribute should be correctly filled (bug 17836)' ); |
227 |
'The \'charges\' attribute should be correctly filled (bug 17836)' ); |
| 227 |
|
228 |
|
|
|
229 |
is( scalar( @{$reply->{fines}->{fine}}), 1, 'There should be only 1 account line'); |
| 230 |
is( |
| 231 |
$reply->{fines}->{fine}->[0]->{accountlines_id}, |
| 232 |
$fine->{accountlines_id}, |
| 233 |
"The accountline should be the correct one" |
| 234 |
); |
| 235 |
|
| 228 |
# Check results: |
236 |
# Check results: |
| 229 |
is_deeply( $reply->{'attributes'}, [ $cmp ], 'Test GetPatronInfo - show_attributes parameter' ); |
237 |
is_deeply( $reply->{'attributes'}, [ $cmp ], 'Test GetPatronInfo - show_attributes parameter' ); |
| 230 |
|
238 |
|
| 231 |
- |
|
|