diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2015-07-09 22:32:26 -0700 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2015-07-09 22:32:26 -0700 |
| commit | 026dc7ad72ba972f230b6709e31fa64397d75ad4 (patch) | |
| tree | c5af1a7ac9154744afc3660e9a9405892f2bb50b /rt/t/ticket/search.t | |
| parent | 07b4bc84d1078f7390221d766cdb3142513db4b0 (diff) | |
| parent | 1c538bfabc2cd31f27067505f0c3d1a46cba6ef0 (diff) | |
merge RT 4.2.11 and Header changes to disable RT javascript, RT#34237
Diffstat (limited to 'rt/t/ticket/search.t')
| -rw-r--r-- | rt/t/ticket/search.t | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/rt/t/ticket/search.t b/rt/t/ticket/search.t index 852241fe5..a43433f06 100644 --- a/rt/t/ticket/search.t +++ b/rt/t/ticket/search.t @@ -283,4 +283,35 @@ like($tix->BuildSelectCountQuery, qr/\bNULL\b/, "Contains upper-case NULL"); unlike($tix->BuildSelectCountQuery, qr/\bnull\b/, "Lacks lower-case NULL"); +# tests for searching by queue lifecycle +$tix = RT::Tickets->new(RT->SystemUser); +$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"); + +$tix = RT::Tickets->new(RT->SystemUser); +$tix->FromSQL('Lifecycle!="default"'); +is($tix->Count,0,"We found 0 tickets in a queue with a lifecycle other than default"); + +$tix = RT::Tickets->new(RT->SystemUser); +$tix->FromSQL('Lifecycle="approvals"'); +is($tix->Count,0,"We found 0 tickets in a queue with the approvals lifecycle"); + + done_testing; |
