View | Details | Raw Unified | Return to bug 33789
Collapse All | Expand All

(-)a/t/db_dependent/Koha/Account.t (-2 / +28 lines)
Lines 182-188 subtest 'outstanding_credits() tests' => sub { Link Here
182
182
183
subtest 'add_credit() tests' => sub {
183
subtest 'add_credit() tests' => sub {
184
184
185
    plan tests => 21;
185
    plan tests => 22;
186
186
187
    $schema->storage->txn_begin;
187
    $schema->storage->txn_begin;
188
188
Lines 294-299 subtest 'add_credit() tests' => sub { Link Here
294
    # Disable cash registers
294
    # Disable cash registers
295
    t::lib::Mocks::mock_preference( 'UseCashRegisters', 0 );
295
    t::lib::Mocks::mock_preference( 'UseCashRegisters', 0 );
296
296
297
    my $item =
298
      $builder->build_sample_item( { biblionumber => 144 } );
299
300
    my $checkout = Koha::Checkout->new(
301
        {
302
            borrowernumber => $patron->id,
303
            itemnumber     => $item->id,
304
            date_due       => \'NOW()',
305
            branchcode     => $patron->branchcode,
306
            issuedate      => \'NOW()',
307
        }
308
    )->store();
309
310
    my $line_4 = $account->add_credit(
311
        {
312
            amount      => 20,
313
            description => 'Manual credit applied',
314
            library_id  => $patron->branchcode,
315
            user_id     => $patron->id,
316
            type        => 'FORGIVEN',
317
            interface   => 'commandline',
318
            issue_id    => $checkout->id
319
        }
320
    );
321
322
    is( $line_4->issue_id, $checkout->id, 'The issue ID matches the checkout ID' );
323
297
    $schema->storage->txn_rollback;
324
    $schema->storage->txn_rollback;
298
};
325
};
299
326
300
- 

Return to bug 33789