[Bast-commits] r5364 - in DBIx-Class/0.08/trunk/t: . lib/DBICTest

ribasushi at dev.catalyst.perl.org ribasushi at dev.catalyst.perl.org
Thu Jan 29 08:44:25 GMT 2009


Author: ribasushi
Date: 2009-01-29 08:44:25 +0000 (Thu, 29 Jan 2009)
New Revision: 5364

Modified:
   DBIx-Class/0.08/trunk/t/99dbic_sqlt_parser.t
   DBIx-Class/0.08/trunk/t/lib/DBICTest/Schema.pm
Log:
Backporting uncovered an incomplete test

Modified: DBIx-Class/0.08/trunk/t/99dbic_sqlt_parser.t
===================================================================
--- DBIx-Class/0.08/trunk/t/99dbic_sqlt_parser.t	2009-01-29 07:29:42 UTC (rev 5363)
+++ DBIx-Class/0.08/trunk/t/99dbic_sqlt_parser.t	2009-01-29 08:44:25 UTC (rev 5364)
@@ -14,12 +14,13 @@
 }
 
 my $schema = DBICTest->init_schema();
-plan tests => ($schema->sources * 3);
+my @sources = grep { $_ ne 'Dummy' } ($schema->sources); # Dummy was yanked out by the sqlt hook test
+plan tests => ( @sources * 3);
 
 { 
 	my $sqlt_schema = create_schema({ schema => $schema, args => { parser_args => { } } });
 
-	foreach my $source ($schema->sources) {
+	foreach my $source (@sources) {
 		my $table = $sqlt_schema->get_table($schema->source($source)->from);
 
 		my $fk_count = scalar(grep { $_->type eq 'FOREIGN KEY' } $table->get_constraints);
@@ -33,7 +34,7 @@
 { 
 	my $sqlt_schema = create_schema({ schema => $schema, args => { parser_args => { add_fk_index => 1 } } });
 
-	foreach my $source ($schema->sources) {
+	foreach my $source (@sources) {
 		my $table = $sqlt_schema->get_table($schema->source($source)->from);
 
 		my $fk_count = scalar(grep { $_->type eq 'FOREIGN KEY' } $table->get_constraints);
@@ -47,7 +48,7 @@
 { 
 	my $sqlt_schema = create_schema({ schema => $schema, args => { parser_args => { add_fk_index => 0 } } });
 
-	foreach my $source ($schema->sources) {
+	foreach my $source (@sources) {
 		my $table = $sqlt_schema->get_table($schema->source($source)->from);
 
 		my @indices = $table->get_indices;

Modified: DBIx-Class/0.08/trunk/t/lib/DBICTest/Schema.pm
===================================================================
--- DBIx-Class/0.08/trunk/t/lib/DBICTest/Schema.pm	2009-01-29 07:29:42 UTC (rev 5363)
+++ DBIx-Class/0.08/trunk/t/lib/DBICTest/Schema.pm	2009-01-29 08:44:25 UTC (rev 5364)
@@ -40,6 +40,7 @@
     'ArtistSubclass',
     'Producer',
     'CD_to_Producer',
+    'Dummy',    # this is a real result class we remove in the hook below
   ),
   qw/SelfRefAlias TreeLike TwoKeyTreeLike Event EventTZ NoPrimaryKey/,
   qw/Collection CollectionObject TypedObject Owners BooksInLibrary/,




More information about the Bast-commits mailing list