[Bast-commits] r6938 - DBIx-Class/0.08/trunk/t/relationship

ribasushi at dev.catalyst.perl.org ribasushi at dev.catalyst.perl.org
Thu Jul 2 11:07:22 GMT 2009


Author: ribasushi
Date: 2009-07-02 11:07:22 +0000 (Thu, 02 Jul 2009)
New Revision: 6938

Modified:
   DBIx-Class/0.08/trunk/t/relationship/core.t
Log:
And more fail

Modified: DBIx-Class/0.08/trunk/t/relationship/core.t
===================================================================
--- DBIx-Class/0.08/trunk/t/relationship/core.t	2009-07-02 10:52:51 UTC (rev 6937)
+++ DBIx-Class/0.08/trunk/t/relationship/core.t	2009-07-02 11:07:22 UTC (rev 6938)
@@ -9,7 +9,7 @@
 my $schema = DBICTest->init_schema();
 my $sdebug = $schema->storage->debug;
 
-plan tests => 78;
+plan tests => 79;
 
 # has_a test
 my $cd = $schema->resultset("CD")->find(4);
@@ -276,10 +276,11 @@
 
 cmp_ok($searched->count, '==', 2, "Both artist returned from map after adding another condition");
 
-# check join through cascaded has_many relationships
+# check join through cascaded has_many relationships (also empty has_many rels)
 $artist = $schema->resultset("Artist")->find(1);
 my $trackset = $artist->cds->search_related('tracks');
-cmp_ok($trackset->count, '==', 10, "Correct number of tracks for artist");
+is($trackset->count, 10, "Correct number of tracks for artist");
+is($trackset->all, 10, "Correct number of track objects for artist");
 
 # now see about updating eveything that belongs to artist 2 to artist 3
 $artist = $schema->resultset("Artist")->find(2);




More information about the Bast-commits mailing list