Restore ability to handle underdefined root (t/prefetch/incomplete.t)
[dbsrgits/DBIx-Class.git] / t / 40compose_connection.t
CommitLineData
e42bbd7f 1use strict;
2use warnings;
3use Test::More;
4use Test::Warn;
5
6use lib qw(t/lib);
7use DBICTest;
8
9warnings_exist { DBICTest->init_schema( compose_connection => 1, sqlite_use_file => 1 ) }
10 [
11 qr/compose_connection deprecated as of 0\.08000/,
12 qr/\QDBIx::Class::ResultSetProxy is DEPRECATED/,
13 ],
14 'got expected deprecation warnings'
15;
16
17cmp_ok(DBICTest->resultset('Artist')->count, '>', 0, 'count is valid');
18
65d35121 19# cleanup globals so we do not trigger the leaktest
20for ( map { DBICTest->schema->class($_) } DBICTest->schema->sources ) {
21 $_->class_resolver(undef);
22 $_->resultset_instance(undef);
23 $_->result_source_instance(undef);
24}
25{
26 no warnings qw/redefine once/;
27 *DBICTest::schema = sub {};
28}
29
e42bbd7f 30done_testing;