use Koha::Account;
use Koha::Account::Lines;
+
use t::lib::Mocks;
use t::lib::TestBuilder;
is_deeply( $line->unblessed, $fetched_line->unblessed, "Fetched line matches the generated one ($i)" );
$i++;
}
-
my $patron_2 = $builder->build_object({ class => 'Koha::Patrons' });
Koha::Account::Line->new({ borrowernumber => $patron_2->id, amountoutstanding => -2 })->store;
my $just_one = Koha::Account::Line->new({ borrowernumber => $patron_2->id, amountoutstanding => 3 })->store;
subtest 'add_credit() tests' => sub {
- plan tests => 15;
+ plan tests => 16;
$schema->storage->txn_begin;
my $patron = $builder->build_object( { class => 'Koha::Patrons' } );
my $account = Koha::Account->new( { patron_id => $patron->borrowernumber } );
+ is( defined $account, 1, "Account is defined" );
is( $account->balance, 0, 'Patron has no balance' );