|
Lines 1-7
Link Here
|
| 1 |
#!/usr/bin/perl |
1 |
#!/usr/bin/perl |
| 2 |
|
2 |
|
| 3 |
use Modern::Perl; |
3 |
use Modern::Perl; |
| 4 |
use Test::More tests => 16; |
4 |
use Test::More tests => 17; |
| 5 |
use Try::Tiny; |
5 |
use Try::Tiny; |
| 6 |
|
6 |
|
| 7 |
use t::lib::TestBuilder; |
7 |
use t::lib::TestBuilder; |
|
Lines 254-257
subtest 'search_by_*_field + find_by_koha_field + get_description' => sub {
Link Here
|
| 254 |
}; |
254 |
}; |
| 255 |
}; |
255 |
}; |
| 256 |
|
256 |
|
|
|
257 |
subtest '$category->values' => sub { |
| 258 |
plan tests => 1; |
| 259 |
Koha::AuthorisedValueCategory->new( { category_name => 'VALUES_TEST' } )->store; |
| 260 |
Koha::AuthorisedValue->new({ category => 'VALUES_TEST', authorised_value => 'test1' })->store; |
| 261 |
Koha::AuthorisedValue->new({ category => 'VALUES_TEST', authorised_value => 'test2' })->store; |
| 262 |
is_deeply( [ sort Koha::AuthorisedValueCategories->find('VALUES_TEST')->values ], [ 'test1', 'test2' ], 'Expecting two values' ); |
| 263 |
}; |
| 264 |
|
| 257 |
$schema->storage->txn_rollback; |
265 |
$schema->storage->txn_rollback; |
| 258 |
- |
|
|