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

(-)a/t/db_dependent/Circulation/StoreLastBorrower.t (-2 / +5 lines)
Lines 38-47 subtest 'Test StoreLastBorrower' => sub { Link Here
38
38
39
    t::lib::Mocks::mock_preference( 'StoreLastBorrower', '1' );
39
    t::lib::Mocks::mock_preference( 'StoreLastBorrower', '1' );
40
40
41
    my $patron = $builder->build(
41
    my $library = $builder->build_object( { class => 'Koha::Libraries' } );
42
    my $patron  = $builder->build(
42
        {
43
        {
43
            source => 'Borrower',
44
            source => 'Borrower',
44
            value  => { privacy => 1, }
45
            value  => { privacy => 1, branchcode => $library->branchcode }
45
        }
46
        }
46
    );
47
    );
47
48
Lines 57-62 subtest 'Test StoreLastBorrower' => sub { Link Here
57
        }
58
        }
58
    );
59
    );
59
60
61
    t::lib::Mocks::mock_userenv( { branchcode => $library->branchcode } );
62
60
    $item = $item->get_from_storage;
63
    $item = $item->get_from_storage;
61
    my $patron_object = $item->last_returned_by();
64
    my $patron_object = $item->last_returned_by();
62
    is( $patron_object, undef, 'Koha::Item::last_returned_by returned undef' );
65
    is( $patron_object, undef, 'Koha::Item::last_returned_by returned undef' );
(-)a/t/db_dependent/Koha/Account/Line.t (-3 / +1 lines)
Lines 394-399 subtest 'apply() tests' => sub { Link Here
394
    is( $messages[0]->payload->{success}, 1, "'success' key in payload" );
394
    is( $messages[0]->payload->{success}, 1, "'success' key in payload" );
395
395
396
    t::lib::Mocks::mock_preference( 'MarkLostItemsAsReturned', 'onpayment');
396
    t::lib::Mocks::mock_preference( 'MarkLostItemsAsReturned', 'onpayment');
397
    t::lib::Mocks::mock_userenv( { branchcode => $library->id } );
397
    my $loser  = $builder->build_object( { class => 'Koha::Patrons' } );
398
    my $loser  = $builder->build_object( { class => 'Koha::Patrons' } );
398
    my $loser_account = $loser->account;
399
    my $loser_account = $loser->account;
399
400
Lines 443-450 subtest 'apply() tests' => sub { Link Here
443
444
444
    is( $loser->checkouts->next, undef, "Item has been returned");
445
    is( $loser->checkouts->next, undef, "Item has been returned");
445
446
446
447
448
    $schema->storage->txn_rollback;
447
    $schema->storage->txn_rollback;
449
};
448
};
450
449
451
- 

Return to bug 33641