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

(-)a/t/db_dependent/AuthorisedValues.t (-2 / +19 lines)
Lines 140-146 my @categories = Koha::AuthorisedValues->new->categories; Link Here
140
is( @categories, @existing_categories+3, 'There should have 3 categories inserted' );
140
is( @categories, @existing_categories+3, 'There should have 3 categories inserted' );
141
141
142
subtest 'search_by_*_field + find_by_koha_field + get_description + authorised_values' => sub {
142
subtest 'search_by_*_field + find_by_koha_field + get_description + authorised_values' => sub {
143
    plan tests => 6;
143
    plan tests => 7;
144
144
145
    my $test_cat = Koha::AuthorisedValueCategories->find('TEST');
145
    my $test_cat = Koha::AuthorisedValueCategories->find('TEST');
146
    $test_cat->delete if $test_cat;
146
    $test_cat->delete if $test_cat;
Lines 248-253 subtest 'search_by_*_field + find_by_koha_field + get_description + authorised_v Link Here
248
            ],
248
            ],
249
        );
249
        );
250
    };
250
    };
251
251
    subtest 'authorised_values' => sub {
252
    subtest 'authorised_values' => sub {
252
253
253
        plan tests => 2;
254
        plan tests => 2;
Lines 279-284 subtest 'search_by_*_field + find_by_koha_field + get_description + authorised_v Link Here
279
280
280
        $schema->storage->txn_rollback;
281
        $schema->storage->txn_rollback;
281
    };
282
    };
283
284
    subtest 'get_description_by_category_and_authorised_value' => sub {
285
        plan tests => 1;
286
        my $description = Koha::AuthorisedValues->get_description_by_category_and_authorised_value(
287
            {
288
                category => $av_0->category,,
289
                authorised_value => $av_0->authorised_value,
290
            }
291
        );
292
        is_deeply(
293
            $description,
294
            {
295
                lib              => $av_0->lib,
296
                opac_description => $av_0->lib_opac
297
            }
298
        );
299
    };
282
};
300
};
283
301
284
$schema->storage->txn_rollback;
302
$schema->storage->txn_rollback;
285
- 

Return to bug 31856