Skip to content

Commit

Permalink
fixed Authors section
Browse files Browse the repository at this point in the history
added License section
fixed t/86sqlt.t tests
  • Loading branch information
abraxxa committed Jan 19, 2010
1 parent f0ac764 commit 827a808
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions lib/SQL/Translator/Parser/DBIx/Class.pm
Expand Up @@ -440,10 +440,10 @@ L<SQL::Translator>, L<DBIx::Class::Schema>
=head1 AUTHORS
Jess Robinson
See L<DBIx::Class/CONTRIBUTORS>.
Matt S Trout
=head1 LICENSE
Ash Berlin
You may distribute this code under the same terms as Perl itself.
Alexander Hartmaier
=cut
17 changes: 9 additions & 8 deletions t/86sqlt.t
Expand Up @@ -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,
},
],
Expand Down Expand Up @@ -464,29 +465,29 @@ 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'" );
}
}

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;
3 changes: 1 addition & 2 deletions t/99dbic_sqlt_parser.t
Expand Up @@ -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
};

{
Expand All @@ -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) {
Expand All @@ -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");
}
}
Expand Down

0 comments on commit 827a808

Please sign in to comment.