Lines 628-636
subtest 'get_onshelfholds_policy() tests' => sub {
Link Here
|
628 |
} |
628 |
} |
629 |
); |
629 |
); |
630 |
|
630 |
|
|
|
631 |
my $memory_cache = Koha::Cache::Memory::Lite->get_instance; |
632 |
$memory_cache->flush(); |
633 |
|
631 |
is( $circ_rules->get_onshelfholds_policy({ item => $item }), 1, 'If rule_value is set on a matching rule, return it' ); |
634 |
is( $circ_rules->get_onshelfholds_policy({ item => $item }), 1, 'If rule_value is set on a matching rule, return it' ); |
632 |
# Delete the rule (i.e. get_effective_rule returns undef) |
635 |
# Delete the rule (i.e. get_effective_rule returns undef) |
633 |
$circ_rules->delete; |
636 |
$circ_rules->delete; |
|
|
637 |
$memory_cache->flush(); |
634 |
is( $circ_rules->get_onshelfholds_policy({ item => $item }), 0, 'If no matching rule, fallback to 0' ); |
638 |
is( $circ_rules->get_onshelfholds_policy({ item => $item }), 0, 'If no matching rule, fallback to 0' ); |
635 |
|
639 |
|
636 |
$schema->storage->txn_rollback; |
640 |
$schema->storage->txn_rollback; |
Lines 901-906
subtest 'get_lostreturn_policy() tests' => sub {
Link Here
|
901 |
) |
905 |
) |
902 |
->next |
906 |
->next |
903 |
->delete; |
907 |
->delete; |
|
|
908 |
$memory_cache->flush(); |
904 |
is_deeply( Koha::CirculationRules->get_lostreturn_policy( $params ), |
909 |
is_deeply( Koha::CirculationRules->get_lostreturn_policy( $params ), |
905 |
{ lostreturn => 'refund', processingreturn => 'refund' },'No rule for branch, no default rule, fallback default (refund)'); |
910 |
{ lostreturn => 'refund', processingreturn => 'refund' },'No rule for branch, no default rule, fallback default (refund)'); |
906 |
|
911 |
|
907 |
- |
|
|