From: Ken Youens-Clark Date: Wed, 11 Jun 2003 03:12:22 +0000 (+0000) Subject: Added "is_valid" tests. X-Git-Tag: v0.02~36 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e32520594222056cd8e2cb468e86802300078f92;p=dbsrgits%2FSQL-Translator.git Added "is_valid" tests. --- diff --git a/t/02mysql-parser.t b/t/02mysql-parser.t index 8538898..5d0e3c9 100644 --- a/t/02mysql-parser.t +++ b/t/02mysql-parser.t @@ -4,7 +4,7 @@ use strict; -use Test::More tests => 177; +use Test::More tests => 180; use SQL::Translator; use SQL::Translator::Parser::MySQL qw(parse); use SQL::Translator::Schema::Constants; @@ -19,6 +19,7 @@ use SQL::Translator::Schema::Constants; my $val = parse($tr, $data); my $schema = $tr->schema; + is( $schema->is_valid, 1, 'Schema is valid' ); my @tables = $schema->get_tables; is( scalar @tables, 1, 'Right number of tables (1)' ); my $table = shift @tables; @@ -77,6 +78,7 @@ use SQL::Translator::Schema::Constants; ); my $schema = $tr->schema; + is( $schema->is_valid, 1, 'Schema is valid' ); my @tables = $schema->get_tables; is( scalar @tables, 1, 'Right number of tables (1)' ); my $table = shift @tables; @@ -244,6 +246,7 @@ use SQL::Translator::Schema::Constants; ) or die $tr->error; my $schema = $tr->schema; + is( $schema->is_valid, 1, 'Schema is valid' ); my @tables = $schema->get_tables; is( scalar @tables, 2, 'Right number of tables (2)' );