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

(-)a/t/db_dependent/Circulation/Branch.t (-6 / +6 lines)
Lines 223-249 is_deeply( Link Here
223
);
223
);
224
224
225
#Test GetBranchItemRule
225
#Test GetBranchItemRule
226
my @lazy_any = ( 'hold_fulfillment_policy' => 'any' );
226
is_deeply(
227
is_deeply(
227
    GetBranchItemRule(
228
    GetBranchItemRule(
228
        $samplebranch1->{branchcode},
229
        $samplebranch1->{branchcode},
229
        $sampleitemtype1->{itemtype}
230
        $sampleitemtype1->{itemtype},
230
    ),
231
    ),
231
    { returnbranch => 'homebranch', holdallowed => 5 },
232
    { returnbranch => 'homebranch', holdallowed => 5, @lazy_any },
232
    "GetBranchitem returns holdallowed and return branch"
233
    "GetBranchitem returns holdallowed and return branch"
233
);
234
);
234
is_deeply(
235
is_deeply(
235
    GetBranchItemRule(),
236
    GetBranchItemRule(),
236
    { returnbranch => 'homebranch', holdallowed => 3 },
237
    { returnbranch => 'homebranch', holdallowed => 3, @lazy_any },
237
"Without parameters GetBranchItemRule returns the values in default_circ_rules"
238
"Without parameters GetBranchItemRule returns the values in default_circ_rules"
238
);
239
);
239
is_deeply(
240
is_deeply(
240
    GetBranchItemRule( $samplebranch2->{branchcode} ),
241
    GetBranchItemRule( $samplebranch2->{branchcode} ),
241
    { returnbranch => 'holdingbranch', holdallowed => 1 },
242
    { returnbranch => 'holdingbranch', holdallowed => 1, @lazy_any },
242
"With only a branchcode GetBranchItemRule returns values in default_branch_circ_rules"
243
"With only a branchcode GetBranchItemRule returns values in default_branch_circ_rules"
243
);
244
);
244
is_deeply(
245
is_deeply(
245
    GetBranchItemRule( -1, -1 ),
246
    GetBranchItemRule( -1, -1 ),
246
    { returnbranch => 'homebranch', holdallowed => 3 },
247
    { returnbranch => 'homebranch', holdallowed => 3, @lazy_any },
247
    "With only one parametern GetBranchItemRule returns default values"
248
    "With only one parametern GetBranchItemRule returns default values"
248
);
249
);
249
250
250
- 

Return to bug 16404