fix multiple DEFAULT NULLs
[dbsrgits/DBIx-Class-Schema-Loader.git] / t / 30_02bad_comment_table.t
CommitLineData
5c06aa08 1use strict;
2use Test::More;
3use Test::Exception;
4use Test::Warn;
5use lib qw(t/lib);
6use File::Slurp qw(slurp);
7use File::Path;
8use make_dbictest_db_bad_comment_tables;
9use dbixcsl_test_dir qw/$tdir/;
ea998e8e 10use Try::Tiny;
5c06aa08 11
12my $dump_path = "$tdir/dump";
13
14{
15 package DBICTest::Schema::1;
16 use base qw/ DBIx::Class::Schema::Loader /;
17 __PACKAGE__->loader_options(
18 dump_directory => $dump_path,
a47e6e74 19 quiet => 1,
5c06aa08 20 );
21}
22
ea998e8e 23try {
24 DBICTest::Schema::1->connect($make_dbictest_db_bad_comment_tables::dsn);
25};
5c06aa08 26
27plan tests => 1;
28
ea998e8e 29my $foo = try { slurp("$dump_path/DBICTest/Schema/1/Result/Foo.pm") };
30my $bar = try { slurp("$dump_path/DBICTest/Schema/1/Result/Bar.pm") };
5c06aa08 31
ea998e8e 32like($foo, qr/Result::Foo\n/, 'No error from invalid comment tables');
5c06aa08 33
34END { rmtree($dump_path, 1, 1); }