[Rt-commit] r7366 - rt/branches/3.7-EXPERIMENTAL-TUNIS/t/ticket

clkao at bestpractical.com clkao at bestpractical.com
Tue Mar 27 08:56:10 EDT 2007


Author: clkao
Date: Tue Mar 27 08:56:10 2007
New Revision: 7366

Modified:
   rt/branches/3.7-EXPERIMENTAL-TUNIS/t/ticket/batch-upload-csv.t

Log:
Fix tests by ensuring the order of returned ticket collection.

Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/ticket/batch-upload-csv.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/ticket/batch-upload-csv.t	(original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/ticket/batch-upload-csv.t	Tue Mar 27 08:56:10 2007
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 use strict; use warnings;
 
-use Test::More qw/no_plan/;
+use Test::More tests => 12;
 use_ok('RT');
 use RT::Test;
 
@@ -35,8 +35,11 @@
 
 my $tix = RT::Tickets->new($RT::SystemUser);
 $tix->FromSQL ("Queue = '". $QUEUE."'");
-ok($tix->Count);
+$tix->OrderByCols({ Field => 'id',  ORDER => 'ASC' });
+is($tix->Count, 2, '2 tickets');
+
 my $first = $tix->First();
+
 is($first->Subject(), 'hi'); 
 is($first->FirstCustomFieldValue($cf->id), '2.0');
 


More information about the Rt-commit mailing list