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