[Koha-patches] [PATCH] more test case fixes

Galen Charlton gmcharlt at gmail.com
Wed Oct 6 17:57:12 CEST 2010


SQLHelper.t - clean up after itself better
Context.t - fix reporting of test plan

Signed-off-by: Galen Charlton <gmcharlt at gmail.com>
---
 t/db_dependent/Context.t   |    8 +++-----
 t/db_dependent/SQLHelper.t |    5 ++++-
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/t/db_dependent/Context.t b/t/db_dependent/Context.t
index 31b0684..eac3265 100755
--- a/t/db_dependent/Context.t
+++ b/t/db_dependent/Context.t
@@ -4,7 +4,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 91;
+use Test::More;
 use vars qw($debug $koha $dbh $config $ret);
 
 BEGIN {
@@ -42,8 +42,6 @@ foreach (grep {defined $koha->{$_}} sort @keys) {
 }
 ok($config = $koha->{config}, 'Getting $koha->{config} ');
 
-# diag("Examining configuration.");
-diag("Note: The overall number of tests may vary by configuration.  Disregard the projected number.");
-1;
-__END__
+done_testing();
 
+1;
diff --git a/t/db_dependent/SQLHelper.t b/t/db_dependent/SQLHelper.t
index f783393..6be0192 100755
--- a/t/db_dependent/SQLHelper.t
+++ b/t/db_dependent/SQLHelper.t
@@ -10,7 +10,7 @@ use YAML;
 use C4::Debug;
 use C4::SQLHelper qw(:all);
 
-use Test::More tests => 20;
+use Test::More tests => 22;
 
 use_ok('C4::SQLHelper');
 
@@ -64,3 +64,6 @@ ok(@$borrowers>0 && !($@), "Search on simple value in firstname");
 $status=DeleteInTable("borrowers",{borrowernumber=>$borrid});
 ok($status>0 && !($@), "DeleteInTable OK");
 $status=DeleteInTable("borrowers",{borrowernumber=>$borrtmp});
+ok($status>0 && !($@), "DeleteInTable OK");
+$status=DeleteInTable("branches", {branchcode => 'ZZZZ'});
+ok($status>0 && !($@), "DeleteInTable (branch) OK");
-- 
1.7.0



More information about the Koha-patches mailing list