[Rt-commit] r4253 - in rt/branches/QUEBEC-EXPERIMENTAL: .
lib/t/regression
alexmv at bestpractical.com
alexmv at bestpractical.com
Tue Dec 6 12:29:48 EST 2005
Author: alexmv
Date: Tue Dec 6 12:29:47 2005
New Revision: 4253
Modified:
rt/branches/QUEBEC-EXPERIMENTAL/ (props changed)
rt/branches/QUEBEC-EXPERIMENTAL/lib/t/regression/20-sort-by-requestor.t
Log:
r7565 at zoq-fot-pik: chmrr | 2005-12-06 12:28:41 -0500
* Tailing test -- paging, ORDER BY, JOIN, and DISTINCT collude to
produce incorrect results, unless the DISTINCT is done very carefully.
See the latest DBIx-SearchBuilder.
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 Tue Dec 6 12:29:47 2005
@@ -61,4 +61,15 @@
is_deeply( [grep {$_} @mails], [ sort grep {$_} @mails ], "Addresses are sorted (exclude nulls, which are db-dependant)");
}
+{
+ my $tix = RT::Tickets->new($RT::SystemUser);
+ $tix->FromSQL("Queue = '$queue'");
+ $tix->OrderByCols({ FIELD => "Requestor.EmailAddress" });
+ $tix->RowsPerPage(30);
+ my @mails;
+ while (my $t = $tix->Next) { push @mails, $t->RequestorAddresses; }
+ is(@mails, 30, "found thirty tickets");
+ is_deeply( [grep {$_} @mails], [ sort grep {$_} @mails ], "Paging works (exclude nulls, which are db-dependant)");
+}
+
# vim:ft=perl:
More information about the Rt-commit
mailing list