[Bast-commits] r6923 - DBIx-Class/0.08/trunk/t/count
ijw at dev.catalyst.perl.org
ijw at dev.catalyst.perl.org
Wed Jul 1 17:34:32 GMT 2009
Author: ijw
Date: 2009-07-01 17:34:32 +0000 (Wed, 01 Jul 2009)
New Revision: 6923
Modified:
DBIx-Class/0.08/trunk/t/count/joined.t
Log:
Added a test for a resultset to related-resultset join for 0 related records
Modified: DBIx-Class/0.08/trunk/t/count/joined.t
===================================================================
--- DBIx-Class/0.08/trunk/t/count/joined.t 2009-07-01 16:35:11 UTC (rev 6922)
+++ DBIx-Class/0.08/trunk/t/count/joined.t 2009-07-01 17:34:32 UTC (rev 6923)
@@ -7,7 +7,7 @@
use DBICTest;
-plan tests => 3;
+plan tests => 5;
my $schema = DBICTest->init_schema();
@@ -26,6 +26,10 @@
"Count correct with requested distinct collapse of main table"
);
+my $artist=$schema->resultset('Artist')->create({name => 'xxx'});
+is($artist->related_resultset('cds')->count(), 0,
+ "No CDs found for a shiny new artist");
+my $artist_rs = $schema->resultset('Artist')->search({artistid => $artist->id});
+is($artist_rs->related_resultset('cds')->count(), 0,
+ "No CDs found for a shiny new artist using a resultset search");
-
-
More information about the Bast-commits
mailing list