[Rt-commit] rt branch, 4.2/date-is-null, updated. rt-4.2.1-64-gf8ccfdf
Jim Brandt
jbrandt at bestpractical.com
Fri Jan 3 16:19:23 EST 2014
The branch, 4.2/date-is-null has been updated
via f8ccfdf3fd735192beb1d90790dc77735aced719 (commit)
from 00903d89dd37d4f01761f6a8a8f1d2b6b0304978 (commit)
Summary of changes:
t/api/tickets.t | 26 ++++++++++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit f8ccfdf3fd735192beb1d90790dc77735aced719
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Fri Jan 3 16:19:09 2014 -0500
Add some simple tests for IS and IS NOT NULL
diff --git a/t/api/tickets.t b/t/api/tickets.t
index 50d08f7..c2ddb79 100644
--- a/t/api/tickets.t
+++ b/t/api/tickets.t
@@ -2,8 +2,7 @@
use strict;
use warnings;
use RT;
-use RT::Test tests => 18;
-
+use RT::Test tests => undef;
{
@@ -114,3 +113,26 @@ ok( $unlimittickets->Count > 0, "UnLimited tickets object should return tickets"
ok $count == 1, "found one ticket";
}
+{
+ my $tickets = RT::Tickets->new( RT->SystemUser );
+ my ($ret, $msg) = $tickets->FromSQL("Resolved IS NULL");
+ ok $ret, "Ran query with IS NULL: $msg";
+ my $count = $tickets->Count();
+ ok $count > 1, "Found more than one ticket";
+ undef $count;
+}
+
+{
+ my $ticket = RT::Ticket->new( RT->SystemUser );
+ ok $ticket->Load(1), "Loaded test ticket 1";
+ ok $ticket->SetStatus('resolved'), "Set to resolved";
+
+ my $tickets = RT::Tickets->new( RT->SystemUser );
+ my ($ret, $msg) = $tickets->FromSQL("Resolved IS NOT NULL");
+ ok $ret, "Ran query with IS NOT NULL: $msg";
+ my $count = $tickets->Count();
+ ok $count == 1, "Found one ticket";
+ undef $count;
+}
+
+done_testing;
-----------------------------------------------------------------------
More information about the rt-commit
mailing list