File: 30_03no_comment_table.t

package info (click to toggle)
libdbix-class-schema-loader-perl 0.07053-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,464 kB
  • sloc: perl: 11,520; sh: 544; makefile: 4
file content (32 lines) | stat: -rw-r--r-- 753 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
use strict;
use warnings;
use Test::More;
use Test::Exception;
use Test::Warn;
use DBIx::Class::Schema::Loader::Utils 'slurp_file';
use File::Path;
use lib qw(t/lib);
use make_dbictest_db;
use dbixcsl_test_dir qw/$tdir/;

my $dump_path = "$tdir/dump";

{
    package DBICTest::Schema::1;
    use base qw/ DBIx::Class::Schema::Loader /;
    __PACKAGE__->loader_options(
        dump_directory => $dump_path,
        quiet => 1,
    );
}

DBICTest::Schema::1->connect($make_dbictest_db::dsn);

plan tests => 1;

my $foo = slurp_file("$dump_path/DBICTest/Schema/1/Result/Foo.pm");
my $bar = slurp_file("$dump_path/DBICTest/Schema/1/Result/Bar.pm");

like($foo, qr/Result::Foo\n/, 'No error from lack of comment tables');

END { rmtree($dump_path, 1, 1); }