[Rt-commit] r5200 - rt/branches/3.5-TESTING/lib/t/regression

ruz at bestpractical.com ruz at bestpractical.com
Thu May 11 03:31:30 EDT 2006


Author: ruz
Date: Thu May 11 03:31:30 2006
New Revision: 5200

Modified:
   rt/branches/3.5-TESTING/lib/t/regression/12-search.t

Log:
* add several CF searches that are failing

Modified: rt/branches/3.5-TESTING/lib/t/regression/12-search.t
==============================================================================
--- rt/branches/3.5-TESTING/lib/t/regression/12-search.t	(original)
+++ rt/branches/3.5-TESTING/lib/t/regression/12-search.t	Thu May 11 03:31:30 2006
@@ -6,7 +6,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 39;
+use Test::More tests => 43;
 use_ok('RT');
 RT::LoadConfig();
 RT::Init();
@@ -242,4 +242,21 @@
 $tix->FromSQL("Queue = '$queue' AND CF.SearchTest IS NULL AND CF.SearchTest2 IS NULL");
 is($tix->Count, 1, "null cf and null cf"); 
 
+# tests with the same CF listed twice
+
+$tix = RT::Tickets->new($RT::SystemUser);
+$tix->FromSQL("CF.SearchTest = 'foo1' OR CF.SearchTest = 'foo3'");
+is($tix->Count, 2, "is cf1 or is cf1");
+
+$tix = RT::Tickets->new($RT::SystemUser);
+$tix->FromSQL("CF.SearchTest = 'foo1' OR CF.SearchTest IS NULL");
+is($tix->Count, 3, "is cf1 or null cf1");
+
+$tix = RT::Tickets->new($RT::SystemUser);
+$tix->FromSQL("(CF.SearchTest = 'foo1' OR CF.SearchTest = 'foo3') AND (CF.SearchTest2 = 'bar1' OR CF.SearchTest2 = 'bar2')");
+is($tix->Count, 1, "(is cf1 or is cf1) and (is cf2 or is cf2)");
+
+$tix = RT::Tickets->new($RT::SystemUser);
+$tix->FromSQL("CF.SearchTest = 'foo1' OR CF.SearchTest = 'foo3' OR CF.SearchTest2 = 'bar1' OR CF.SearchTest2 = 'bar2'");
+is($tix->Count, 3, "is cf1 or is cf1 or is cf2 or is cf2");
 


More information about the Rt-commit mailing list