[Rt-commit] r3872 - in rt/branches/QUEBEC-EXPERIMENTAL: .
lib/t/regression
alexmv at bestpractical.com
alexmv at bestpractical.com
Thu Sep 22 12:38:17 EDT 2005
Author: alexmv
Date: Thu Sep 22 12:38:17 2005
New Revision: 3872
Modified:
rt/branches/QUEBEC-EXPERIMENTAL/ (props changed)
rt/branches/QUEBEC-EXPERIMENTAL/lib/t/regression/20-sort-by-requestor.t
Log:
r6181 at zoq-fot-pik: chmrr | 2005-09-02 12:09:41 -0400
* Additional tests for no requestor (should still sort correctly)
Modified: rt/branches/QUEBEC-EXPERIMENTAL/lib/t/regression/20-sort-by-requestor.t
==============================================================================
--- rt/branches/QUEBEC-EXPERIMENTAL/lib/t/regression/20-sort-by-requestor.t (original)
+++ rt/branches/QUEBEC-EXPERIMENTAL/lib/t/regression/20-sort-by-requestor.t Thu Sep 22 12:38:17 2005
@@ -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 twenty 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");
}
@@ -48,6 +49,7 @@
while (my $t = $tix->Next) { push @mails, $t->RequestorAddresses; }
is(@mails, 5, "found five tickets");
is_deeply( \@mails, [ sort @mails ], "Addresses are sorted");
+ print STDERR "Emails are ", join(" ", map {defined $_ ? $_ : "undef"} @mails);
}
{
@@ -56,8 +58,9 @@
$tix->OrderByCols({ FIELD => "Requestor.EmailAddress" });
my @mails;
while (my $t = $tix->Next) { push @mails, $t->RequestorAddresses; }
- is(@mails, 5, "found five tickets");
+ is(@mails, 6, "found six tickets");
is_deeply( \@mails, [ sort @mails ], "Addresses are sorted");
+ print STDERR "Emails are ", join(" ", map {defined $_ ? $_ : "undef"} @mails);
}
# vim:ft=perl:
More information about the Rt-commit
mailing list