[Bast-commits] r8041 - DBIx-Class/0.08/branches/mssql_rno_pagination/t

ribasushi at dev.catalyst.perl.org ribasushi at dev.catalyst.perl.org
Sat Dec 5 10:03:00 GMT 2009


Author: ribasushi
Date: 2009-12-05 10:03:00 +0000 (Sat, 05 Dec 2009)
New Revision: 8041

Modified:
   DBIx-Class/0.08/branches/mssql_rno_pagination/t/746mssql.t
Log:
Extend test just a bit more

Modified: DBIx-Class/0.08/branches/mssql_rno_pagination/t/746mssql.t
===================================================================
--- DBIx-Class/0.08/branches/mssql_rno_pagination/t/746mssql.t	2009-12-05 09:46:41 UTC (rev 8040)
+++ DBIx-Class/0.08/branches/mssql_rno_pagination/t/746mssql.t	2009-12-05 10:03:00 UTC (rev 8041)
@@ -345,10 +345,16 @@
   );
 
   is ($rs->all, 3, 'Correct amount of objects from right-sorted joined resultset');
-  my $limited_rs = $rs->search ({}, {rows => 2, offset => 2});
-  is ($limited_rs->count, 1, 'Correct count of limited right-sorted joined resultset');
-  is ($limited_rs->count_rs->next, 1, 'Correct count_rs of limited right-sorted joined resultset');
-  is ($limited_rs->all, 1, 'Correct amount of objects from limited right-sorted joined resultset');
+  my $limited_rs = $rs->search ({}, {rows => 3, offset => 1});
+  is ($limited_rs->count, 2, 'Correct count of limited right-sorted joined resultset');
+  is ($limited_rs->count_rs->next, 2, 'Correct count_rs of limited right-sorted joined resultset');
+  is ($limited_rs->all, 2, 'Correct amount of objects from limited right-sorted joined resultset');
+
+  is_deeply (
+    [map { $_->name } ($limited_rs->search_related ('owner')->all) ],
+    [qw/woggle wiggle/],    # there is 1 woggle library book and 2 wiggle books, the limit gets us one of each
+    'Rows were properly ordered'
+  );
 }
 
 done_testing;




More information about the Bast-commits mailing list