[Bast-commits] r4485 - DBIx-Class/0.08/branches/parser_fk_index/t
lukes at dev.catalyst.perl.org
lukes at dev.catalyst.perl.org
Tue Jun 10 21:07:56 BST 2008
Author: lukes
Date: 2008-06-10 21:07:56 +0100 (Tue, 10 Jun 2008)
New Revision: 4485
Modified:
DBIx-Class/0.08/branches/parser_fk_index/t/86sqlt.t
Log:
fixed failing test
Modified: DBIx-Class/0.08/branches/parser_fk_index/t/86sqlt.t
===================================================================
--- DBIx-Class/0.08/branches/parser_fk_index/t/86sqlt.t 2008-06-10 19:40:42 UTC (rev 4484)
+++ DBIx-Class/0.08/branches/parser_fk_index/t/86sqlt.t 2008-06-10 20:07:56 UTC (rev 4485)
@@ -10,7 +10,7 @@
my $schema = DBICTest->init_schema;
-plan tests => 131;
+plan tests => 130;
my $translator = SQL::Translator->new(
parser_args => {
@@ -43,6 +43,7 @@
'name' => 'twokeys_fk_cd', 'index_name' => 'twokeys_idx_cd',
'selftable' => 'twokeys', 'foreigntable' => 'cd',
'selfcols' => ['cd'], 'foreigncols' => ['cdid'],
+ 'noindex' => 1,
on_delete => '', on_update => '', deferrable => 0,
},
{
@@ -388,8 +389,13 @@
"is_deferrable parameter correct for `$desc'" );
my $index = get_index( $got->table, { fields => $expected->{selfcols} } );
- ok( defined $index, "index exists for `$desc'" );
- is( $index->name, $expected->{index_name}, "index has correct name for `$desc'" );
+
+ if ($expected->{noindex}) {
+ ok( !defined $index, "index doesn't for `$desc'" );
+ } else {
+ ok( defined $index, "index exists for `$desc'" );
+ is( $index->name, $expected->{index_name}, "index has correct name for `$desc'" );
+ }
}
sub test_unique {
More information about the Bast-commits
mailing list