|
Lines 332-338
t::lib::Mocks::mock_preference( 'item-level_itypes', 0 );
Link Here
|
| 332 |
$schema->storage->txn_rollback; |
332 |
$schema->storage->txn_rollback; |
| 333 |
|
333 |
|
| 334 |
subtest "GetBranchItemRule() tests" => sub { |
334 |
subtest "GetBranchItemRule() tests" => sub { |
| 335 |
plan tests => 3; |
335 |
plan tests => 5; |
| 336 |
|
336 |
|
| 337 |
$schema->storage->txn_begin; |
337 |
$schema->storage->txn_begin; |
| 338 |
|
338 |
|
|
Lines 390-398
subtest "GetBranchItemRule() tests" => sub {
Link Here
|
| 390 |
t::lib::Mocks::mock_preference( 'CircControlReturnsBranch', 'ItemHomeLibrary' ); |
390 |
t::lib::Mocks::mock_preference( 'CircControlReturnsBranch', 'ItemHomeLibrary' ); |
| 391 |
is( Koha::CirculationRules->get_return_branch_policy($item), 'homebranch' ); |
391 |
is( Koha::CirculationRules->get_return_branch_policy($item), 'homebranch' ); |
| 392 |
|
392 |
|
|
|
393 |
$item->floating(1); |
| 394 |
is( Koha::CirculationRules->get_return_branch_policy($item), 'noreturn' ); |
| 395 |
$item->floating(0); |
| 396 |
|
| 393 |
t::lib::Mocks::mock_preference( 'CircControlReturnsBranch', 'ItemHoldingLibrary' ); |
397 |
t::lib::Mocks::mock_preference( 'CircControlReturnsBranch', 'ItemHoldingLibrary' ); |
| 394 |
is( Koha::CirculationRules->get_return_branch_policy($item), 'holdingbranch' ); |
398 |
is( Koha::CirculationRules->get_return_branch_policy($item), 'holdingbranch' ); |
| 395 |
|
399 |
|
|
|
400 |
$item->floating(1); |
| 401 |
is( Koha::CirculationRules->get_return_branch_policy($item), 'noreturn' ); |
| 402 |
$item->floating(0); |
| 403 |
|
| 396 |
t::lib::Mocks::mock_preference( 'CircControlReturnsBranch', 'CheckInLibrary' ); |
404 |
t::lib::Mocks::mock_preference( 'CircControlReturnsBranch', 'CheckInLibrary' ); |
| 397 |
is( Koha::CirculationRules->get_return_branch_policy($item), 'noreturn' ); |
405 |
is( Koha::CirculationRules->get_return_branch_policy($item), 'noreturn' ); |
| 398 |
|
406 |
|
| 399 |
- |
|
|