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

(-)a/t/db_dependent/Koha/CirculationRules.t (-1 / +5 lines)
Lines 580-588 subtest 'get_onshelfholds_policy() tests' => sub { Link Here
580
        }
580
        }
581
    );
581
    );
582
582
583
    my $memory_cache = Koha::Cache::Memory::Lite->get_instance;
584
    $memory_cache->flush();
585
583
    is( $circ_rules->get_onshelfholds_policy({ item => $item }), 1, 'If rule_value is set on a matching rule, return it' );
586
    is( $circ_rules->get_onshelfholds_policy({ item => $item }), 1, 'If rule_value is set on a matching rule, return it' );
584
    # Delete the rule (i.e. get_effective_rule returns undef)
587
    # Delete the rule (i.e. get_effective_rule returns undef)
585
    $circ_rules->delete;
588
    $circ_rules->delete;
589
    $memory_cache->flush();
586
    is( $circ_rules->get_onshelfholds_policy({ item => $item }), 0, 'If no matching rule, fallback to 0' );
590
    is( $circ_rules->get_onshelfholds_policy({ item => $item }), 0, 'If no matching rule, fallback to 0' );
587
591
588
    $schema->storage->txn_rollback;
592
    $schema->storage->txn_rollback;
Lines 853-858 subtest 'get_lostreturn_policy() tests' => sub { Link Here
853
          )
857
          )
854
        ->next
858
        ->next
855
        ->delete;
859
        ->delete;
860
    $memory_cache->flush();
856
    is_deeply( Koha::CirculationRules->get_lostreturn_policy( $params ),
861
    is_deeply( Koha::CirculationRules->get_lostreturn_policy( $params ),
857
         { lostreturn => 'refund', processingreturn => 'refund' },'No rule for branch, no default rule, fallback default (refund)');
862
         { lostreturn => 'refund', processingreturn => 'refund' },'No rule for branch, no default rule, fallback default (refund)');
858
863
859
- 

Return to bug 32092