From: Peter Rabbitson Date: Thu, 2 Jul 2009 11:07:22 +0000 (+0000) Subject: And more fail X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=597508e858c5b675a4b3678b8748b6ea4364e4d2;p=dbsrgits%2FDBIx-Class-Historic.git And more fail --- diff --git a/t/relationship/core.t b/t/relationship/core.t index 9087333..566e5f3 100644 --- a/t/relationship/core.t +++ b/t/relationship/core.t @@ -9,7 +9,7 @@ use DBICTest; 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 @@ my $searched = $mapped_rs->search({'mapped_artists.artistid' => {'!=', undef}}); 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);