From: Luke Saunders Date: Tue, 10 Jun 2008 20:07:56 +0000 (+0000) Subject: fixed failing test X-Git-Tag: v0.08240~427^2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9c1f7965d4bb248b20c6501eea21284fcc541749;p=dbsrgits%2FDBIx-Class.git fixed failing test --- diff --git a/t/86sqlt.t b/t/86sqlt.t index 300ac37..5bd92f3 100644 --- a/t/86sqlt.t +++ b/t/86sqlt.t @@ -10,7 +10,7 @@ plan skip_all => 'SQL::Translator required' if $@; my $schema = DBICTest->init_schema; -plan tests => 131; +plan tests => 130; my $translator = SQL::Translator->new( parser_args => { @@ -43,6 +43,7 @@ my %fk_constraints = ( '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 @@ sub test_fk { "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 {