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

(-)a/t/db_dependent/Circulation.t (-6 / +8 lines)
Lines 2216-2231 subtest 'ItemsDeniedRenewal preference' => sub { Link Here
2216
2216
2217
    t::lib::Mocks::mock_preference( 'ItemsDeniedRenewal', '' );
2217
    t::lib::Mocks::mock_preference( 'ItemsDeniedRenewal', '' );
2218
2218
2219
    $dbh->do('DELETE FROM issues');
2219
    my $idr_lib = $builder->build_object({ class => 'Koha::Libraries'});
2220
    $dbh->do('DELETE FROM items');
2221
    $dbh->do('DELETE FROM issuingrules');
2222
    $dbh->do(
2220
    $dbh->do(
2223
        q{
2221
        q{
2224
        INSERT INTO issuingrules ( categorycode, branchcode, itemtype, reservesallowed, maxissueqty, issuelength, lengthunit, renewalsallowed, renewalperiod,
2222
        INSERT INTO issuingrules ( categorycode, branchcode, itemtype, reservesallowed, maxissueqty, issuelength, lengthunit, renewalsallowed, renewalperiod,
2225
                    norenewalbefore, auto_renew, fine, chargeperiod ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
2223
                    norenewalbefore, auto_renew, fine, chargeperiod ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
2226
        },
2224
        },
2227
        {},
2225
        {},
2228
        '*', '*', '*', 25,
2226
        '*', $idr_lib->branchcode, '*', 25,
2229
        20,  14,  'days',
2227
        20,  14,  'days',
2230
        10,   7,
2228
        10,   7,
2231
        undef,  0,
2229
        undef,  0,
Lines 2233-2238 subtest 'ItemsDeniedRenewal preference' => sub { Link Here
2233
    );
2231
    );
2234
2232
2235
    my $deny_book = $builder->build_object({ class => 'Koha::Items', value => {
2233
    my $deny_book = $builder->build_object({ class => 'Koha::Items', value => {
2234
        homebranch => $idr_lib->branchcode,
2236
        withdrawn => 1,
2235
        withdrawn => 1,
2237
        itype => 'HIDE',
2236
        itype => 'HIDE',
2238
        location => 'PROC',
2237
        location => 'PROC',
Lines 2241-2253 subtest 'ItemsDeniedRenewal preference' => sub { Link Here
2241
        }
2240
        }
2242
    });
2241
    });
2243
    my $allow_book = $builder->build_object({ class => 'Koha::Items', value => {
2242
    my $allow_book = $builder->build_object({ class => 'Koha::Items', value => {
2243
        homebranch => $idr_lib->branchcode,
2244
        withdrawn => 0,
2244
        withdrawn => 0,
2245
        itype => 'NOHIDE',
2245
        itype => 'NOHIDE',
2246
        location => 'NOPROC'
2246
        location => 'NOPROC'
2247
        }
2247
        }
2248
    });
2248
    });
2249
2249
2250
    my $idr_borrower = $builder->build_object({ class => 'Koha::Patrons'});
2250
    my $idr_borrower = $builder->build_object({ class => 'Koha::Patrons', value=> {
2251
        branchcode => $idr_lib->branchcode,
2252
        }
2253
    });
2251
    my $future = dt_from_string->add( days => 1 );
2254
    my $future = dt_from_string->add( days => 1 );
2252
    my $deny_issue = $builder->build_object({ class => 'Koha::Checkouts', value => {
2255
    my $deny_issue = $builder->build_object({ class => 'Koha::Checkouts', value => {
2253
        returndate => undef,
2256
        returndate => undef,
2254
- 

Return to bug 15494