[Bast-commits] r4969 - DBIx-Class/0.08/trunk/t

ribasushi at dev.catalyst.perl.org ribasushi at dev.catalyst.perl.org
Fri Oct 24 15:32:17 BST 2008


Author: ribasushi
Date: 2008-10-24 15:32:17 +0100 (Fri, 24 Oct 2008)
New Revision: 4969

Modified:
   DBIx-Class/0.08/trunk/t/66relationship.t
Log:
complete a test

Modified: DBIx-Class/0.08/trunk/t/66relationship.t
===================================================================
--- DBIx-Class/0.08/trunk/t/66relationship.t	2008-10-24 13:29:08 UTC (rev 4968)
+++ DBIx-Class/0.08/trunk/t/66relationship.t	2008-10-24 14:32:17 UTC (rev 4969)
@@ -7,7 +7,7 @@
 
 my $schema = DBICTest->init_schema();
 
-plan tests => 65;
+plan tests => 67;
 
 # has_a test
 my $cd = $schema->resultset("CD")->find(4);
@@ -255,12 +255,11 @@
 cmp_ok($nartist->cds->count, '==', 2, "Correct new #cds for artist");
 
 my $new_artist = $schema->resultset("Artist")->new_result({ 'name' => 'Depeche Mode' });
-# why must i tell him: make a new related from me and me is me? that works!
-# my $new_related_cd = $new_artist->new_related('cds', { 'title' => 'Leave in Silence', 'year' => 1982, 'artist' => $new_artist });
 my $new_related_cd = $new_artist->new_related('cds', { 'title' => 'Leave in Silence', 'year' => 1982});
 eval {
        $new_artist->insert;
        $new_related_cd->insert;
 };
-$@ && diag($@);
-ok($new_related_cd->in_storage, 'new_related_cd insert ok');
+is ($@, '', 'Staged insertion successful');
+ok($new_artist->in_storage, 'artist inserted');
+ok($new_related_cd->in_storage, 'new_related_cd inserted');




More information about the Bast-commits mailing list