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

(-)a/t/db_dependent/Koha/Patrons.t (-2 / +15 lines)
Lines 2114-2120 subtest 'BorrowersLog and CardnumberLog tests' => sub { Link Here
2114
$schema->storage->txn_rollback;
2114
$schema->storage->txn_rollback;
2115
2115
2116
subtest 'Test Koha::Patrons::merge' => sub {
2116
subtest 'Test Koha::Patrons::merge' => sub {
2117
    plan tests => 113;
2117
    plan tests => 118;
2118
2118
2119
    my $schema = Koha::Database->new()->schema();
2119
    my $schema = Koha::Database->new()->schema();
2120
2120
Lines 2302-2307 subtest 'Test Koha::Patrons::merge' => sub { Link Here
2302
2302
2303
    };
2303
    };
2304
2304
2305
    subtest 'ILL requests' => sub {
2306
        plan tests => 3;
2307
2308
        my $keep_patron  = $builder->build_object( { class => 'Koha::Patrons' } );
2309
        my $merge_patron = $builder->build_object( { class => 'Koha::Patrons' } );
2310
        my $ill_request  = $builder->build_sample_ill_request( { borrowernumber => $merge_patron->borrowernumber } );
2311
2312
        is( $merge_patron->ill_requests->count, 1, 'Patron to be merged has 1 ILL request' );
2313
        is( $keep_patron->ill_requests->count,  0, 'Patron to be kept has 0 ILL requests' );
2314
2315
        $keep_patron->merge_with( [ $merge_patron->borrowernumber ] );
2316
        is( $keep_patron->ill_requests->count, 1, 'Patron to be kept now has 1 ILL request' );
2317
    };
2318
2305
    t::lib::Mocks::mock_preference( 'AnonymousPatron', '' );
2319
    t::lib::Mocks::mock_preference( 'AnonymousPatron', '' );
2306
    $schema->storage->txn_rollback;
2320
    $schema->storage->txn_rollback;
2307
};
2321
};
2308
- 

Return to bug 36360