parser improvements and test correction
[dbsrgits/DBIx-Class.git] / t / 99dbic_sqlt_parser.t
index 900e124..42eeb92 100644 (file)
@@ -9,7 +9,7 @@ BEGIN {
     eval "use DBD::mysql; use SQL::Translator 0.09;";
     plan $@
         ? ( skip_all => 'needs SQL::Translator 0.09 for testing' )
-        : ( tests => 99 );
+        : ( tests => 102 );
 }
 
 my $schema = DBICTest->init_schema();
@@ -23,6 +23,7 @@ my $schema = DBICTest->init_schema();
                my $fk_count = scalar(grep { $_->type eq 'FOREIGN KEY' } $table->get_constraints);
                my @indices = $table->get_indices;
                my $index_count = scalar(@indices);
+    $index_count++ if ($source eq 'TwoKeys'); # TwoKeys has the index turned off on the rel def
                is($index_count, $fk_count, "correct number of indices for $source with no args");
        }
 }
@@ -36,6 +37,7 @@ my $schema = DBICTest->init_schema();
                my $fk_count = scalar(grep { $_->type eq 'FOREIGN KEY' } $table->get_constraints);
                my @indices = $table->get_indices;
                my $index_count = scalar(@indices);
+    $index_count++ if ($source eq 'TwoKeys'); # TwoKeys has the index turned off on the rel def
                is($index_count, $fk_count, "correct number of indices for $source with add_fk_index => 1");
        }
 }