[Bast-commits] r3381 - branches/DBIx-Class/bulk_create/t

jnapiorkowski at dev.catalyst.perl.org jnapiorkowski at dev.catalyst.perl.org
Fri May 25 05:42:14 GMT 2007


Author: jnapiorkowski
Date: 2007-05-25 05:42:13 +0100 (Fri, 25 May 2007)
New Revision: 3381

Modified:
   branches/DBIx-Class/bulk_create/t/101populate_rs.t
Log:
fixed some tests

Modified: branches/DBIx-Class/bulk_create/t/101populate_rs.t
===================================================================
--- branches/DBIx-Class/bulk_create/t/101populate_rs.t	2007-05-25 04:21:26 UTC (rev 3380)
+++ branches/DBIx-Class/bulk_create/t/101populate_rs.t	2007-05-25 04:42:13 UTC (rev 3381)
@@ -8,7 +8,6 @@
 ## Also need to test some stuff that should generate errors.
 ## ----------------------------------------------------------------------------
 
-
 use strict;
 use warnings;
 
@@ -16,8 +15,9 @@
 use lib qw(t/lib);
 use DBICTest;
 
-plan tests => 53;
+plan tests => 98;
 
+
 ## ----------------------------------------------------------------------------
 ## Get a Schema and some ResultSets we can play with.
 ## ----------------------------------------------------------------------------
@@ -320,7 +320,10 @@
 		ok( $formerly->name eq 'VOID_PK_Formerly Named', "Got Correct name for result object");
 		
 		## Create the expected children sub objects?
-		use Data::Dump qw/dump/;
+		ok( $crap->can('cds'), "Has cds relationship");
+		ok( $girl->can('cds'), "Has cds relationship");
+		ok( $damn->can('cds'), "Has cds relationship");
+		ok( $formerly->can('cds'), "Has cds relationship");
 		
 		ok( $crap->cds->count == 0, "got Expected Number of Cds");
 		ok( $girl->cds->count == 2, "got Expected Number of Cds");	
@@ -470,10 +473,11 @@
 		ok( $formerly->name eq 'VOID_Formerly Named', "Got Correct name for result object");
 		
 		## Create the expected children sub objects?
-		use Data::Dump qw/dump/;
+		ok( $crap->can('cds'), "Has cds relationship");
+		ok( $girl->can('cds'), "Has cds relationship");
+		ok( $damn->can('cds'), "Has cds relationship");
+		ok( $formerly->can('cds'), "Has cds relationship");
 		
-		warn dump map { $_->get_columns } $damn->cds;
-		
 		ok( $crap->cds->count == 0, "got Expected Number of Cds");
 		ok( $girl->cds->count == 2, "got Expected Number of Cds");	
 		ok( $damn->cds->count == 3, "got Expected Number of Cds");
@@ -482,9 +486,21 @@
 		## Did the cds get expected information?
 		
 		my ($cd1, $cd2) = $girl->cds->search({},{order_by=>'year ASC'});
+
+		ok($cd1, "Got a got CD");
+		ok($cd2, "Got a got CD");
 		
-		ok( $cd1->title eq "VOID_My First CD", "Got Expected CD Title");
-		ok( $cd2->title eq "VOID_Yet More Tweeny-Pop crap", "Got Expected CD Title");
+		SKIP:{
+		
+			skip "Can't Test CD because we failed to create it", 1 unless $cd1;
+			ok( $cd1->title eq "VOID_My First CD", "Got Expected CD Title");
+		}
+		
+		SKIP:{
+		
+			skip "Can't Test CD because we failed to create it", 1 unless $cd2;
+			ok( $cd2->title eq "VOID_Yet More Tweeny-Pop crap", "Got Expected CD Title");
+		}
 	}
 
 }




More information about the Bast-commits mailing list