Lines 24-29
use Data::Dumper;
Link Here
|
24 |
use Test::More tests => 36; |
24 |
use Test::More tests => 36; |
25 |
|
25 |
|
26 |
use C4::Branch; |
26 |
use C4::Branch; |
|
|
27 |
use Koha::Libraries; |
28 |
use Koha::LibraryCategories; |
27 |
|
29 |
|
28 |
BEGIN { |
30 |
BEGIN { |
29 |
use FindBin; |
31 |
use FindBin; |
Lines 46-53
can_ok(
Link Here
|
46 |
GetBranchCategories |
48 |
GetBranchCategories |
47 |
GetBranchesInCategory |
49 |
GetBranchesInCategory |
48 |
ModBranchCategoryInfo |
50 |
ModBranchCategoryInfo |
49 |
DelBranch |
|
|
50 |
DelBranchCategory |
51 |
CheckCategoryUnique |
51 |
CheckCategoryUnique |
52 |
mybranch |
52 |
mybranch |
53 |
GetBranchesCount) |
53 |
GetBranchesCount) |
Lines 118-126
$b2->{add} = 1;
Link Here
|
118 |
ModBranch($b2); |
118 |
ModBranch($b2); |
119 |
is( GetBranchesCount(), $count + 2, "two branches added" ); |
119 |
is( GetBranchesCount(), $count + 2, "two branches added" ); |
120 |
|
120 |
|
121 |
#Test DelBranch |
121 |
is( Koha::Libraries->find( $b2->{branchcode} )->delete, 1, "One row affected" ); |
122 |
|
|
|
123 |
is( DelBranch( $b2->{branchcode} ), 1, "One row affected" ); |
124 |
is( GetBranchesCount(), $count + 1, "branch BRB deleted" ); |
122 |
is( GetBranchesCount(), $count + 1, "branch BRB deleted" ); |
125 |
|
123 |
|
126 |
#Test GetBranchName |
124 |
#Test GetBranchName |
Lines 220-227
is_deeply( $cat1detail, $cat1, 'CAT1 details are right' );
Link Here
|
220 |
my $category = GetBranchCategory('LIBCATCODE'); |
218 |
my $category = GetBranchCategory('LIBCATCODE'); |
221 |
is_deeply($category, \%new_category, 'fetched newly added library category'); |
219 |
is_deeply($category, \%new_category, 'fetched newly added library category'); |
222 |
|
220 |
|
223 |
#Test DelBranchCategory |
221 |
my $del = Koha::LibraryCategories->find( $cat2->{categorycode} )->delete; |
224 |
my $del = DelBranchCategory( $cat2->{categorycode} ); |
|
|
225 |
is( $del, 1, 'One row affected' ); |
222 |
is( $del, 1, 'One row affected' ); |
226 |
|
223 |
|
227 |
$categories = GetBranchCategories(); |
224 |
$categories = GetBranchCategories(); |
228 |
- |
|
|