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

(-)a/t/db_dependent/Items.t (-3 / +19 lines)
Lines 34-40 use Koha::AuthorisedValues; Link Here
34
use t::lib::Mocks;
34
use t::lib::Mocks;
35
use t::lib::TestBuilder;
35
use t::lib::TestBuilder;
36
36
37
use Test::More tests => 17;
37
use Test::More tests => 18;
38
38
39
use Test::Warn;
39
use Test::Warn;
40
40
Lines 1124-1127 subtest 'tests for GetMarcItemFields' => sub { Link Here
1124
    is_deeply( $item3_marc->field($itemtag), @$marc_items[0], "We should get the third item when explicitly requested");
1124
    is_deeply( $item3_marc->field($itemtag), @$marc_items[0], "We should get the third item when explicitly requested");
1125
1125
1126
    $schema->storage->txn_rollback;
1126
    $schema->storage->txn_rollback;
1127
};
1127
};
1128
1129
subtest 'tests for UseHidingRulesWithBorrowerCategory' => sub {
1130
    plan tests => 6;
1131
1132
    t::lib::Mocks::mock_preference('OpacHiddenItemsExceptions', '');
1133
1134
    is(C4::Items::UseHidingRulesWithBorrowerCategory('PT'), 1, 'Hiding rules used for category PT');
1135
    is(C4::Items::UseHidingRulesWithBorrowerCategory('S'), 1, 'Hiding rules used for category S');
1136
1137
    t::lib::Mocks::mock_preference('OpacHiddenItemsExceptions', 'S|L');
1138
1139
    is(C4::Items::UseHidingRulesWithBorrowerCategory('PT'), 1, 'Hiding rules used for category PT');
1140
    is(C4::Items::UseHidingRulesWithBorrowerCategory('S'), 0, 'Hiding rules ignored for category S');
1141
    is(C4::Items::UseHidingRulesWithBorrowerCategory('L'), 0, 'Hiding rules ignored for category L');
1142
1143
    is(C4::Items::UseHidingRulesWithBorrowerCategory(), 1, 'Hiding rules used for unspecified category');
1144
};
1128
- 

Return to bug 20664