* Test cases for every supported order_by syntax.
[dbsrgits/DBIx-Class.git] / t / 99dbic_sqlt_parser.t
index 900e124..1ad7832 100644 (file)
@@ -8,8 +8,8 @@ use DBICTest;
 BEGIN {
     eval "use DBD::mysql; use SQL::Translator 0.09;";
     plan $@
-        ? ( skip_all => 'needs SQL::Translator 0.09 for testing' )
-        : ( tests => 99 );
+        ? ( skip_all => 'needs DBD::mysql and SQL::Translator 0.09 for testing' )
+        : ( 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");
        }
 }