Cleanup shebang lines of all maint/example scripts, remove from tests entirely
[dbsrgits/DBIx-Class.git] / t / 39load_namespaces_3.t
CommitLineData
44930c36 1use strict;
2use warnings;
3use Test::More;
ca507a2f 4use Test::Exception;
5use Test::Warn;
44930c36 6
d8190011 7use lib qw(t/lib);
8use DBICTest; # do not remove even though it is not used
44930c36 9
ca507a2f 10lives_ok (sub {
11 warnings_exist ( sub {
12 package DBICNSTestOther;
13 use base qw/DBIx::Class::Schema/;
14 __PACKAGE__->load_namespaces(
15 result_namespace => [ '+DBICNSTest::Rslt', '+DBICNSTest::OtherRslt' ],
16 resultset_namespace => '+DBICNSTest::RSet',
17 );
18 },
19 qr/load_namespaces found ResultSet class C with no corresponding Result class/,
20 );
21});
44930c36 22
23my $source_a = DBICNSTestOther->source('A');
24isa_ok($source_a, 'DBIx::Class::ResultSource::Table');
25my $rset_a = DBICNSTestOther->resultset('A');
26isa_ok($rset_a, 'DBICNSTest::RSet::A');
44930c36 27
28my $source_b = DBICNSTestOther->source('B');
29isa_ok($source_b, 'DBIx::Class::ResultSource::Table');
30my $rset_b = DBICNSTestOther->resultset('B');
31isa_ok($rset_b, 'DBIx::Class::ResultSet');
f017c022 32
33my $source_d = DBICNSTestOther->source('D');
34isa_ok($source_d, 'DBIx::Class::ResultSource::Table');
ca507a2f 35
36done_testing;