use CGI qw ( -utf8 );
use Test::More tests => 3;
+use Test::MockModule;
use t::lib::Mocks;
use t::lib::TestBuilder;
subtest 'GetPatronInfo/GetBorrowerAttributes test for extended patron attributes' => sub {
- plan tests => 1;
+ plan tests => 2;
$schema->storage->txn_begin;
}
} );
+ my $members = Test::MockModule->new('C4::Members');
+ $members->mock( 'GetMemberAccountBalance', sub { return ( 10, 10, 0 ); } );
+
# Prepare and send web request for IL-SDI server:
my $query = new CGI;
$query->param( 'service', 'GetPatronInfo' );
value_description => undef,
};
+ is( $reply->{'charges'}, '10.00',
+ 'The \'charges\' attribute should be correctly filled (bug 17836)' );
+
# Check results:
is_deeply( $reply->{'attributes'}, [ $cmp ], 'Test GetPatronInfo - show_attributes parameter' );
$schema->storage->txn_rollback;
};
-1;