[Rt-commit] r4408 - in rt/branches/3.5-TESTING: lib/t/regression

jesse at bestpractical.com jesse at bestpractical.com
Thu Jan 19 10:11:41 EST 2006


Author: jesse
Date: Thu Jan 19 10:11:39 2006
New Revision: 4408

Modified:
   rt/branches/3.5-TESTING/   (props changed)
   rt/branches/3.5-TESTING/lib/t/regression/20-sort-by-requestor.t

Log:
 r22721 at truegrounds:  jesse | 2006-01-19 10:08:18 -0500
  * mergeup fixes


Modified: rt/branches/3.5-TESTING/lib/t/regression/20-sort-by-requestor.t
==============================================================================
--- rt/branches/3.5-TESTING/lib/t/regression/20-sort-by-requestor.t	(original)
+++ rt/branches/3.5-TESTING/lib/t/regression/20-sort-by-requestor.t	Thu Jan 19 10:11:39 2006
@@ -11,9 +11,10 @@
 my $queue = 'SearchTests-'.rand(200);
 $q->Create(Name => $queue);
 
-my @requestors = ( ('bravo at example.com') x 5, ('alpha at example.com') x 5,
-                   ('delta at example.com') x 5, ('charlie at example.com') x 5);
-my @subjects = ("first test", "second test", "third test", "fourth test") x 5;
+my @requestors = ( ('bravo at example.com') x 6, ('alpha at example.com') x 6,
+                   ('delta at example.com') x 6, ('charlie at example.com') x 6,
+                   (undef) x 6);
+my @subjects = ("first test", "second test", "third test", "fourth test", "fifth test") x 6;
 while (@requestors) {
     my $t = RT::Ticket->new($RT::SystemUser);
     my ( $id, undef $msg ) = $t->Create(
@@ -27,7 +28,7 @@
 {
     my $tix = RT::Tickets->new($RT::SystemUser);
     $tix->FromSQL("Queue = '$queue'");
-    is($tix->Count, 20, "found twenty tickets");
+    is($tix->Count, 30, "found thirty tickets");
 }
 
 {
@@ -36,7 +37,7 @@
     $tix->OrderByCols({ FIELD => "Subject" });
     my @subjects;
     while (my $t = $tix->Next) { push @subjects, $t->Subject; }
-    is(@subjects, 5, "found five tickets");
+    is(@subjects, 6, "found six tickets");
     is_deeply( \@subjects, [ sort @subjects ], "Subjects are sorted");
 }
 
@@ -45,7 +46,7 @@
     my ($tix,$count,$order) = (@_);
     my @mails;
     while (my $t = $tix->Next) { push @mails, $t->RequestorAddresses; }
-    is(@mails, $count, "found $count tickets");
+    is(@mails, $count, "found $count tickets for ". $tix->Query);
     my @required_order;
     if( $order =~ /asc/i ) {
         @required_order = sort { $a? ($b? ($a cmp $b) : -1) : 1} @mails;
@@ -72,24 +73,13 @@
     my $tix = RT::Tickets->new($RT::SystemUser);
     $tix->FromSQL("Queue = '$queue' AND Subject = 'first test'");
     $tix->OrderByCols({ FIELD => "Requestor.EmailAddress" });
-    check_emails_order($tix, 5, 'ASC');
+    check_emails_order($tix, 6, 'ASC');
     $tix->OrderByCols({ FIELD => "Requestor.EmailAddress", ORDER => 'DESC' });
-    check_emails_order($tix, 5, 'DESC');
+    check_emails_order($tix, 6, 'DESC');
 }
 
 
 {
-    # create ticket with empty requestor list
-    my $t = RT::Ticket->new($RT::SystemUser);
-    my ( $id, $msg ) = $t->Create(
-        Queue      => $q->id,
-        Subject    => "first test",
-    );
-    ok( $id, "ticket created" ) or diag( "error: $msg" );
-    is( $t->RequestorAddresses, '', "requestor address is empty" );
-}
-
-{
     my $tix = RT::Tickets->new($RT::SystemUser);
     $tix->FromSQL("Queue = '$queue' AND Subject = 'first test'");
     $tix->OrderByCols({ FIELD => "Requestor.EmailAddress" });


More information about the Rt-commit mailing list