use C4::Context;
use Data::Dumper;
-use Test::More tests => 21;
+use Test::More tests => 19;
use C4::Branch;
use Koha::Libraries;
GetBranch
GetBranches
GetBranchesLoop
- GetBranchDetail
ModBranch
GetBranchInfo
mybranch
branchip => 'ipA',
branchprinter => undef,
branchnotes => 'noteA',
- opac_info => 'opacA'
+ opac_info => 'opacA',
+ issuing => undef,
};
my $b2 = {
branchcode => 'BRB',
branchprinter => undef,
branchnotes => 'noteB',
opac_info => 'opacB',
+ issuing => undef,
};
ModBranch($b1);
is( ModBranch($b2), undef, 'the field add is missing' );
is( GetBranchName( $b1->{branchcode} ),
$b1->{branchname}, "GetBranchName returns the right name" );
-#Test GetBranchDetail
-my $branchdetail = GetBranchDetail( $b1->{branchcode} );
-$branchdetail->{add} = 1;
-$b1->{issuing} = undef; # Not used in DB
-is_deeply( $branchdetail, $b1, 'branchdetail is right' );
-
#Test Getbranches
my $branches = GetBranches();
is( scalar( keys %$branches ),
branchip => 'ipA modified',
branchprinter => undef,
branchnotes => 'notesA modified',
- opac_info => 'opacA modified'
+ opac_info => 'opacA modified',
+ issuing => undef,
};
ModBranch($b1);
is( Koha::Libraries->search->count, $count + 1,
"A branch has been modified, no new branch added" );
-$branchdetail = GetBranchDetail( $b1->{branchcode} );
-$b1->{issuing} = undef;
-is_deeply( $branchdetail, $b1 , "GetBranchDetail gives the details of BRA");
#Test categories
my $count_cat = Koha::LibraryCategories->search->count;
branchprinter => undef,
branchnotes => 'noteB',
opac_info => 'opacB',
+ issuing => undef,
CAT1 => 1,
CAT2 => 1
};
push( @cat, $cat2->{categorycode} );
delete $b2->{CAT1};
delete $b2->{CAT2};
-$b2->{issuing} = undef;
$b2->{categories} = \@cat;
is_deeply( @$b2info[0], $b2, 'BRB has the category CAT1 and CAT2' );