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

(-)a/t/db_dependent/Circulation.t (-3 / +13 lines)
Lines 1741-1747 subtest 'AddReturn + CumulativeRestrictionPeriods' => sub { Link Here
1741
};
1741
};
1742
1742
1743
subtest 'AddReturn + suspension_chargeperiod' => sub {
1743
subtest 'AddReturn + suspension_chargeperiod' => sub {
1744
    plan tests => 12;
1744
    plan tests => 14;
1745
1745
1746
    my $library = $builder->build( { source => 'Branch' } );
1746
    my $library = $builder->build( { source => 'Branch' } );
1747
    my $patron  = $builder->build( { source => 'Borrower', value => { categorycode => $patron_category->{categorycode} } } );
1747
    my $patron  = $builder->build( { source => 'Borrower', value => { categorycode => $patron_category->{categorycode} } } );
Lines 1892-1897 subtest 'AddReturn + suspension_chargeperiod' => sub { Link Here
1892
            expiration_date => $expected_expiration_dt->clone->add( days => 1 ),
1892
            expiration_date => $expected_expiration_dt->clone->add( days => 1 ),
1893
        }
1893
        }
1894
    );
1894
    );
1895
1896
    test_debarment_on_checkout(
1897
        {
1898
            item            => $item_1,
1899
            library         => $library,
1900
            patron          => $patron,
1901
            return_date     => dt_from_string->add(days => 5),
1902
            expiration_date => dt_from_string->add(days => 5 + (5 * 2 - 1) ),
1903
        }
1904
    );
1895
};
1905
};
1896
1906
1897
subtest 'AddReturn | is_overdue' => sub {
1907
subtest 'AddReturn | is_overdue' => sub {
Lines 2393-2398 sub test_debarment_on_checkout { Link Here
2393
    my $library  = $params->{library};
2403
    my $library  = $params->{library};
2394
    my $patron   = $params->{patron};
2404
    my $patron   = $params->{patron};
2395
    my $due_date = $params->{due_date} || dt_from_string;
2405
    my $due_date = $params->{due_date} || dt_from_string;
2406
    my $return_date = $params->{return_date} || dt_from_string;
2396
    my $expected_expiration_date = $params->{expiration_date};
2407
    my $expected_expiration_date = $params->{expiration_date};
2397
2408
2398
    $expected_expiration_date = output_pref(
2409
    $expected_expiration_date = output_pref(
Lines 2407-2413 sub test_debarment_on_checkout { Link Here
2407
    AddIssue( $patron, $item->{barcode}, $due_date );
2418
    AddIssue( $patron, $item->{barcode}, $due_date );
2408
2419
2409
    AddReturn( $item->{barcode}, $library->{branchcode},
2420
    AddReturn( $item->{barcode}, $library->{branchcode},
2410
        undef, undef, dt_from_string );
2421
        undef, undef, $return_date );
2411
    my $debarments = Koha::Patron::Debarments::GetDebarments(
2422
    my $debarments = Koha::Patron::Debarments::GetDebarments(
2412
        { borrowernumber => $patron->{borrowernumber}, type => 'SUSPENSION' } );
2423
        { borrowernumber => $patron->{borrowernumber}, type => 'SUSPENSION' } );
2413
    is( scalar(@$debarments), 1, 'Test at line ' . $line_number );
2424
    is( scalar(@$debarments), 1, 'Test at line ' . $line_number );
2414
- 

Return to bug 20660