From: Alexander Hartmaier Date: Tue, 19 Jan 2010 11:38:44 +0000 (+0000) Subject: fixed Authors section X-Git-Tag: v0.08116~50^2~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=827a808f2651b5460a8a8f9ae8bfeed0e062b302;p=dbsrgits%2FDBIx-Class.git fixed Authors section added License section fixed t/86sqlt.t tests --- diff --git a/lib/SQL/Translator/Parser/DBIx/Class.pm b/lib/SQL/Translator/Parser/DBIx/Class.pm index 43bbfae..0f8f6aa 100644 --- a/lib/SQL/Translator/Parser/DBIx/Class.pm +++ b/lib/SQL/Translator/Parser/DBIx/Class.pm @@ -440,10 +440,10 @@ L, L =head1 AUTHORS -Jess Robinson +See L. -Matt S Trout +=head1 LICENSE -Ash Berlin +You may distribute this code under the same terms as Perl itself. -Alexander Hartmaier +=cut diff --git a/t/86sqlt.t b/t/86sqlt.t index e710ec1..26e1fc2 100644 --- a/t/86sqlt.t +++ b/t/86sqlt.t @@ -269,6 +269,7 @@ my %fk_constraints = ( 'name' => 'forceforeign_fk_artist', 'index_name' => 'forceforeign_idx_artist', 'selftable' => 'forceforeign', 'foreigntable' => 'artist', 'selfcols' => ['artist'], 'foreigncols' => ['artistid'], + 'noindex' => 1, on_delete => '', on_update => '', deferrable => 1, }, ], @@ -464,21 +465,21 @@ sub test_fk { my ($expected, $got) = @_; my $desc = $expected->{display}; is( $got->name, $expected->{name}, - "name parameter correct for `$desc'" ); + "name parameter correct for '$desc'" ); is( $got->on_delete, $expected->{on_delete}, - "on_delete parameter correct for `$desc'" ); + "on_delete parameter correct for '$desc'" ); is( $got->on_update, $expected->{on_update}, - "on_update parameter correct for `$desc'" ); + "on_update parameter correct for '$desc'" ); is( $got->deferrable, $expected->{deferrable}, - "is_deferrable parameter correct for `$desc'" ); + "is_deferrable parameter correct for '$desc'" ); my $index = get_index( $got->table, { fields => $expected->{selfcols} } ); if ($expected->{noindex}) { - ok( !defined $index, "index doesn't for `$desc'" ); + 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'" ); + ok( defined $index, "index exists for '$desc'" ); + is( $index->name, $expected->{index_name}, "index has correct name for '$desc'" ); } } @@ -486,7 +487,7 @@ sub test_unique { my ($expected, $got) = @_; my $desc = $expected->{display}; is( $got->name, $expected->{name}, - "name parameter correct for `$desc'" ); + "name parameter correct for '$desc'" ); } done_testing; diff --git a/t/99dbic_sqlt_parser.t b/t/99dbic_sqlt_parser.t index 8ebae0d..5ce9fe4 100644 --- a/t/99dbic_sqlt_parser.t +++ b/t/99dbic_sqlt_parser.t @@ -39,6 +39,7 @@ my $idx_exceptions = { 'Artwork' => -1, 'ForceForeign' => -1, 'LinerNotes' => -1, + 'TwoKeys' => -1, # TwoKeys has the index turned off on the rel def }; { @@ -52,7 +53,6 @@ my $idx_exceptions = { my @indices = $table->get_indices; my $index_count = scalar(@indices); - $index_count++ if ($source_name eq 'TwoKeys'); # TwoKeys has the index turned off on the rel def is($index_count, $fk_count, "correct number of indices for $source_name with no args"); for my $index (@indices) { @@ -74,7 +74,6 @@ my $idx_exceptions = { $fk_count += $idx_exceptions->{$source_name} || 0; my @indices = $table->get_indices; my $index_count = scalar(@indices); - $index_count++ if ($source_name eq 'TwoKeys'); # TwoKeys has the index turned off on the rel def is($index_count, $fk_count, "correct number of indices for $source_name with add_fk_index => 1"); } }