Lines 20-25
use Modern::Perl;
Link Here
|
20 |
use CGI qw ( -utf8 ); |
20 |
use CGI qw ( -utf8 ); |
21 |
|
21 |
|
22 |
use Test::More tests => 3; |
22 |
use Test::More tests => 3; |
|
|
23 |
use Test::MockModule; |
23 |
use t::lib::Mocks; |
24 |
use t::lib::Mocks; |
24 |
use t::lib::TestBuilder; |
25 |
use t::lib::TestBuilder; |
25 |
|
26 |
|
Lines 94-100
subtest 'AuthenticatePatron test' => sub {
Link Here
|
94 |
|
95 |
|
95 |
subtest 'GetPatronInfo/GetBorrowerAttributes test for extended patron attributes' => sub { |
96 |
subtest 'GetPatronInfo/GetBorrowerAttributes test for extended patron attributes' => sub { |
96 |
|
97 |
|
97 |
plan tests => 1; |
98 |
plan tests => 2; |
98 |
|
99 |
|
99 |
$schema->storage->txn_begin; |
100 |
$schema->storage->txn_begin; |
100 |
|
101 |
|
Lines 165-170
subtest 'GetPatronInfo/GetBorrowerAttributes test for extended patron attributes
Link Here
|
165 |
} |
166 |
} |
166 |
} ); |
167 |
} ); |
167 |
|
168 |
|
|
|
169 |
my $members = Test::MockModule->new('C4::Members'); |
170 |
$members->mock( 'GetMemberAccountBalance', sub { return ( 10, 10, 0 ); } ); |
171 |
|
168 |
# Prepare and send web request for IL-SDI server: |
172 |
# Prepare and send web request for IL-SDI server: |
169 |
my $query = new CGI; |
173 |
my $query = new CGI; |
170 |
$query->param( 'service', 'GetPatronInfo' ); |
174 |
$query->param( 'service', 'GetPatronInfo' ); |
Lines 184-189
subtest 'GetPatronInfo/GetBorrowerAttributes test for extended patron attributes
Link Here
|
184 |
value_description => undef, |
188 |
value_description => undef, |
185 |
}; |
189 |
}; |
186 |
|
190 |
|
|
|
191 |
is( $reply->{'charges'}, '10.00', |
192 |
'The \'charges\' attribute should be correctly filled (bug 17836)' ); |
193 |
|
187 |
# Check results: |
194 |
# Check results: |
188 |
is_deeply( $reply->{'attributes'}, [ $cmp ], 'Test GetPatronInfo - show_attributes parameter' ); |
195 |
is_deeply( $reply->{'attributes'}, [ $cmp ], 'Test GetPatronInfo - show_attributes parameter' ); |
189 |
|
196 |
|
190 |
- |
|
|