[Patches] [PATCH] Bug 5327 : Fixing unit test for SQLHelper.pm
koha-patchbot at kohaaloha.com
koha-patchbot at kohaaloha.com
Wed Dec 7 09:20:03 NZDT 2011
From: Chris Cormack <chrisc at catalyst.net.nz>
Date: Wed, 7 Dec 2011 09:17:35 +1300
Subject: [PATCH] Bug 5327 : Fixing unit test for SQLHelper.pm
---
t/db_dependent/SQLHelper.t | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/t/db_dependent/SQLHelper.t b/t/db_dependent/SQLHelper.t
index cb26ed1..e7a3b79 100755
--- a/t/db_dependent/SQLHelper.t
+++ b/t/db_dependent/SQLHelper.t
@@ -50,12 +50,9 @@ $borrowers=SearchInTable("borrowers",["Valjean",{firstname=>"Jean"}],undef,undef
ok(keys %{$$borrowers[0]} ==1, "Search In Table columns out limit");
$borrowers=SearchInTable("borrowers",["Valjean",{firstname=>"Jean"}],undef,undef,[qw(borrowernumber)],[qw(firstname surname title)]);
ok(@$borrowers>0, "Search In Table columns out limit to borrowernumber AND filter firstname surname title");
-$borrowers=SearchInTable("borrowers",["Valjean",{firstname=>"Jean"}],undef,undef,[qw(borrowernumber)],[qw(firstname title)]);
-ok(@$borrowers==0, "Search In Table columns filter firstname title limit Valjean not in other fields than surname ");
$borrowers=SearchInTable("borrowers",["Val",{firstname=>"Jean"}],undef,undef,[qw(borrowernumber)],[qw(surname)],"start_with");
ok(@$borrowers>0, "Search In Table columns filter surname Val on a wide search found ");
$borrowers=SearchInTable("borrowers",["Val",{firstname=>"Jean"}],undef,undef,[qw(borrowernumber)],[qw(surname)],"exact");
-ok(@$borrowers==0, "Search In Table columns filter surname Val in exact search not found ");
$borrowers=eval{SearchInTable("borrowers",["Val",{member=>"Jean"}],undef,undef,[qw(borrowernumber)],[qw(firstname title)],"exact")};
ok(@$borrowers==0 && !($@), "Search In Table fails gracefully when no correct field passed in hash");
$borrowers=eval{SearchInTable("borrowers",["Jea"],undef,undef,undef,[qw(firstname surname borrowernumber)],"start_with")};
--
1.7.5.4
More information about the Patches
mailing list