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

(-)a/t/db_dependent/Koha/Account.t (-2 / +14 lines)
Lines 678-684 subtest 'reconcile_balance' => sub { Link Here
678
678
679
subtest 'pay() tests' => sub {
679
subtest 'pay() tests' => sub {
680
680
681
    plan tests => 3;
681
    plan tests => 5;
682
682
683
    $schema->storage->txn_begin;
683
    $schema->storage->txn_begin;
684
684
Lines 719-724 subtest 'pay() tests' => sub { Link Here
719
    # Disable cash registers
719
    # Disable cash registers
720
    t::lib::Mocks::mock_preference( 'UseCashRegisters', 1 );
720
    t::lib::Mocks::mock_preference( 'UseCashRegisters', 1 );
721
721
722
    # Undef userenv
723
    $context->mock( 'userenv', undef );
724
    my $result = $account->pay(
725
        {
726
            amount => 20,
727
            payment_Type => 'CASH',
728
            interface => 'intranet'
729
        }
730
    );
731
    ok($result, "Koha::Account->pay functions without a userenv");
732
    my $payment = Koha::Account::Lines->find({accountlines_id => $result->{payment_id}});
733
    is($payment->manager_id, undef, "manager_id left undefined when no userenv found");
734
722
    $schema->storage->txn_rollback;
735
    $schema->storage->txn_rollback;
723
};
736
};
724
737
725
- 

Return to bug 26506