Commit | Line | Data |
44930c36 |
1 | use strict; |
2 | use warnings; |
3 | use Test::More; |
ca507a2f |
4 | use Test::Exception; |
5 | use Test::Warn; |
44930c36 |
6 | |
d8190011 |
7 | use lib qw(t/lib); |
8 | use DBICTest; # do not remove even though it is not used |
44930c36 |
9 | |
ca507a2f |
10 | lives_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 | |
23 | my $source_a = DBICNSTestOther->source('A'); |
24 | isa_ok($source_a, 'DBIx::Class::ResultSource::Table'); |
25 | my $rset_a = DBICNSTestOther->resultset('A'); |
26 | isa_ok($rset_a, 'DBICNSTest::RSet::A'); |
44930c36 |
27 | |
28 | my $source_b = DBICNSTestOther->source('B'); |
29 | isa_ok($source_b, 'DBIx::Class::ResultSource::Table'); |
30 | my $rset_b = DBICNSTestOther->resultset('B'); |
31 | isa_ok($rset_b, 'DBIx::Class::ResultSet'); |
f017c022 |
32 | |
33 | my $source_d = DBICNSTestOther->source('D'); |
34 | isa_ok($source_d, 'DBIx::Class::ResultSource::Table'); |
ca507a2f |
35 | |
36 | done_testing; |