[Koha-patches] [PATCH] [SIGNED-OFF] C4::Branch.pm needs unit tests
Srdjan
srdjan at catalyst.net.nz
Wed Jul 24 05:12:37 CEST 2013
From: Kenza Zaki <kenza.zaki at biblibre.com>
Unit tests are wrap in a transaction.
To test:
prove t/db_dependent/Branch.t
t/db_dependent/Branch.t .. 1/36 Using a hash as a reference is deprecated at t/db_dependent/Branch.t line 207.
t/db_dependent/Branch.t .. ok
All tests successful.
Files=1, Tests=36, 1 wallclock secs ( 0.02 usr 0.02 sys + 0.13 cusr 0.01 csys = 0.18 CPU)
Result: PASS
http://bugs.koha-community.org/show_bug.cgi?id=10508
Signed-off-by: Srdjan <srdjan at catalyst.net.nz>
---
t/db_dependent/Branch.t | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/t/db_dependent/Branch.t b/t/db_dependent/Branch.t
index 4251816..ffa2346 100644
--- a/t/db_dependent/Branch.t
+++ b/t/db_dependent/Branch.t
@@ -21,7 +21,7 @@ use Modern::Perl;
use C4::Context;
use Data::Dumper;
-use Test::More ;#tests => 6;
+use Test::More tests => 36;
use C4::Branch;
@@ -161,7 +161,7 @@ is( GetBranchesCount, $count + 1,
"A branch has been modified, no new branch added" );
$branchdetail = GetBranchDetail( $b1->{branchcode} );
$b1->{issuing} = undef;
-is_deeply( $branchdetail, $b1 );
+is_deeply( $branchdetail, $b1 , "GetBranchDetail gives the details of BRA");
#Test categories
my $categories = GetBranchCategories;
@@ -350,4 +350,3 @@ is( scalar(@$loop), GetBranchesCount, 'There is the right number of branches' );
# End transaction
$dbh->rollback;
-done_testing;
--
1.8.1.2
More information about the Koha-patches
mailing list