* Added ->first and ->reset implementation to ResultSetColumn.
[dbsrgits/DBIx-Class.git] / t / 88result_set_column.t
index 67262f0..66169f3 100644 (file)
@@ -8,10 +8,10 @@ use DBICTest;
 
 my $schema = DBICTest->init_schema();
 
-plan tests => 16;
+plan tests => 18;
 
 my $cd;
-my $rs = $cd = $schema->resultset("CD")->search({});
+my $rs = $cd = $schema->resultset("CD")->search({}, { order_by => 'cdid' });
 
 my $rs_title = $rs->get_column('title');
 my $rs_year = $rs->get_column('year');
@@ -29,6 +29,11 @@ is($rs_title->min, 'Caterwaulin\' Blues', "min okay for title");
 
 cmp_ok($rs_year->sum, '==', 9996, "three artists returned");
 
+$rs_year->reset;
+is($rs_year->next, 1999, "reset okay");
+
+is($rs_year->first, 1999, "first okay");
+
 # test +select/+as for single column
 my $psrs = $schema->resultset('CD')->search({},
     {