|
Lines 21-27
use Modern::Perl;
Link Here
|
| 21 |
use C4::Context; |
21 |
use C4::Context; |
| 22 |
use Data::Dumper; |
22 |
use Data::Dumper; |
| 23 |
|
23 |
|
| 24 |
use Test::More tests => 24; |
24 |
use Test::More tests => 23; |
| 25 |
|
25 |
|
| 26 |
use C4::Branch; |
26 |
use C4::Branch; |
| 27 |
use Koha::Libraries; |
27 |
use Koha::Libraries; |
|
Lines 42-48
can_ok(
Link Here
|
| 42 |
get_branchinfos_of |
42 |
get_branchinfos_of |
| 43 |
ModBranch |
43 |
ModBranch |
| 44 |
GetBranchInfo |
44 |
GetBranchInfo |
| 45 |
GetCategoryTypes |
|
|
| 46 |
GetBranchesInCategory |
45 |
GetBranchesInCategory |
| 47 |
ModBranchCategoryInfo |
46 |
ModBranchCategoryInfo |
| 48 |
mybranch |
47 |
mybranch |
|
Lines 293-302
$brCat1 = GetBranchesInCategory( $cat1->{categorycode} );
Link Here
|
| 293 |
push( @b, $b3->{branchcode} ); |
292 |
push( @b, $b3->{branchcode} ); |
| 294 |
is_deeply( $brCat1, \@b, 'CAT1 has branch BRB and BRC' ); |
293 |
is_deeply( $brCat1, \@b, 'CAT1 has branch BRB and BRC' ); |
| 295 |
|
294 |
|
| 296 |
#Test GetCategoryTypes |
|
|
| 297 |
my @category_types = GetCategoryTypes(); |
| 298 |
is_deeply(\@category_types, [ 'searchdomain', 'properties' ], 'received expected library category types'); |
| 299 |
|
| 300 |
#TODO later: test mybranchine and onlymine |
295 |
#TODO later: test mybranchine and onlymine |
| 301 |
# Actually we cannot mock C4::Context->userenv in unit tests |
296 |
# Actually we cannot mock C4::Context->userenv in unit tests |
| 302 |
|
297 |
|
| 303 |
- |
|
|