[Rt-commit] rt branch, 4.2/search-by-lifecycle, updated. rt-4.2.9-137-ge79d257
Jesse Vincent
jesse at bestpractical.com
Thu Feb 5 17:49:12 EST 2015
The branch, 4.2/search-by-lifecycle has been updated
via e79d257b11fb500e4ca2dfe725b673782ed596e5 (commit)
from e2de24ab34d7a6ebdda53cd97e92505a99900b22 (commit)
Summary of changes:
t/ticket/search.t | 13 +++++++++++++
1 file changed, 13 insertions(+)
- Log -----------------------------------------------------------------
commit e79d257b11fb500e4ca2dfe725b673782ed596e5
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Thu Feb 5 14:48:16 2015 -0800
Added tests for more complex lifecycle searches.
This commit adds tests for basic boolean lifecycle searches and
for mixing queue name with lifecycle in searches
diff --git a/t/ticket/search.t b/t/ticket/search.t
index dface5c..b5be92b 100644
--- a/t/ticket/search.t
+++ b/t/ticket/search.t
@@ -289,6 +289,19 @@ $tix->FromSQL('Lifecycle="default"');
is($tix->Count,7,"We found all 7 tickets in a queue with the default lifecycle");
$tix = RT::Tickets->new(RT->SystemUser);
+$tix->FromSQL('Lifecycle ="approvals" OR Lifecycle="default"');
+is($tix->Count,7,"We found 7 tickets in a queue with a lifecycle of default or approvals");
+
+$tix = RT::Tickets->new(RT->SystemUser);
+$tix->FromSQL('Lifecycle ="approvals" AND Lifecycle="default"');
+is($tix->Count,0,"We found 0 tickets in a queue with a lifecycle of default AND approvals...(because that's impossible");
+
+$tix = RT::Tickets->new(RT->SystemUser);
+$tix->FromSQL('Queue="'.$queue.'" AND Lifecycle="default"');
+is($tix->Count,7,"We found 7 tickets in $queue with a lifecycle of default");
+
+
+$tix = RT::Tickets->new(RT->SystemUser);
$tix->FromSQL('Lifecycle !="approvals"');
is($tix->Count,7,"We found 7 tickets in a queue with a lifecycle other than approvals");
-----------------------------------------------------------------------
More information about the rt-commit
mailing list