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

(-)a/t/db_dependent/Accounts.t (-1 / +8 lines)
Lines 1093-1098 subtest "Payment notice tests" => sub { Link Here
1093
        }
1093
        }
1094
    )->store();
1094
    )->store();
1095
1095
1096
    my $manager = $builder->build_object({ class => "Koha::Patrons" });
1097
    my $context = new Test::MockModule('C4::Context');
1098
    $context->mock( 'userenv', sub {
1099
        return {
1100
            number     => $manager->borrowernumber,
1101
            branch     => $manager->branchcode,
1102
        };
1103
    });
1096
    my $account = Koha::Account->new({ patron_id => $borrower->id });
1104
    my $account = Koha::Account->new({ patron_id => $borrower->id });
1097
1105
1098
    my $line = Koha::Account::Line->new({ borrowernumber => $borrower->borrowernumber, amountoutstanding => 27 })->store();
1106
    my $line = Koha::Account::Line->new({ borrowernumber => $borrower->borrowernumber, amountoutstanding => 27 })->store();
Lines 1102-1108 subtest "Payment notice tests" => sub { Link Here
1102
    $letter->store();
1110
    $letter->store();
1103
1111
1104
    t::lib::Mocks::mock_preference('UseEmailReceipts', '0');
1112
    t::lib::Mocks::mock_preference('UseEmailReceipts', '0');
1105
1106
    my $id = $account->pay( { amount => 1 } );
1113
    my $id = $account->pay( { amount => 1 } );
1107
    is( Koha::Notice::Messages->search()->count(), 0, 'Notice for payment not sent if UseEmailReceipts is disabled' );
1114
    is( Koha::Notice::Messages->search()->count(), 0, 'Notice for payment not sent if UseEmailReceipts is disabled' );
1108
1115
(-)a/t/db_dependent/Circulation.t (-1 / +4 lines)
Lines 916-921 my ( $reused_itemnumber_1, $reused_itemnumber_2 ); Link Here
916
    ( $renewokay, $error ) = CanBookBeRenewed($renewing_borrowernumber, $item_7->itemnumber);
916
    ( $renewokay, $error ) = CanBookBeRenewed($renewing_borrowernumber, $item_7->itemnumber);
917
    is( $renewokay, 0, '(Bug 8236), Cannot renew, one of the items is overdue');
917
    is( $renewokay, 0, '(Bug 8236), Cannot renew, one of the items is overdue');
918
918
919
    my $manager = $builder->build_object({ class => "Koha::Patrons" });
920
    t::lib::Mocks::mock_userenv({ patron => $manager,branchcode => $manager->branchcode });
919
    t::lib::Mocks::mock_preference('WhenLostChargeReplacementFee','1');
921
    t::lib::Mocks::mock_preference('WhenLostChargeReplacementFee','1');
920
    $checkout = Koha::Checkouts->find( { itemnumber => $item_3->itemnumber } );
922
    $checkout = Koha::Checkouts->find( { itemnumber => $item_3->itemnumber } );
921
    LostItem( $item_3->itemnumber, 'test', 0 );
923
    LostItem( $item_3->itemnumber, 'test', 0 );
Lines 2004-2009 subtest '_FixAccountForLostAndReturned' => sub { Link Here
2004
        plan tests => 10;
2006
        plan tests => 10;
2005
2007
2006
        my $patron = $builder->build_object( { class => 'Koha::Patrons' } );
2008
        my $patron = $builder->build_object( { class => 'Koha::Patrons' } );
2009
        my manager = $builder->build_object({ class => "Koha::Patrons" });
2010
        t::lib::Mocks::mock_userenv({ patron => $manager,branchcode => $manager->branchcode });
2007
2011
2008
        my $item = $builder->build_sample_item(
2012
        my $item = $builder->build_sample_item(
2009
            {
2013
            {
2010
- 

Return to bug 22008