From dbe36a2bf361e1cda73f83cc5cfc79e71c6cf216 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Wed, 7 Dec 2011 09:17:35 +1300 Subject: [PATCH] Bug 5327 : Fixing unit test for SQLHelper.pm Signed-off-by: Liz Rea Confirm that all SQLHelper tests pass. --- t/db_dependent/SQLHelper.t | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/t/db_dependent/SQLHelper.t b/t/db_dependent/SQLHelper.t index cb26ed121c..d6d2b99a32 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 => 22; +use Test::More tests => 20; use_ok('C4::SQLHelper'); @@ -50,12 +50,8 @@ $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")}; -- 2.39.5