Commit | Line | Data |
c0329273 |
1 | BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) } |
2 | |
44930c36 |
3 | use strict; |
4 | use warnings; |
5 | use Test::More; |
ca507a2f |
6 | use Test::Exception; |
7 | use Test::Warn; |
44930c36 |
8 | |
c0329273 |
9 | |
d8190011 |
10 | use DBICTest; # do not remove even though it is not used |
44930c36 |
11 | |
ca507a2f |
12 | lives_ok (sub { |
13 | warnings_exist ( sub { |
14 | package DBICNSTestOther; |
15 | use base qw/DBIx::Class::Schema/; |
16 | __PACKAGE__->load_namespaces( |
17 | result_namespace => [ '+DBICNSTest::Rslt', '+DBICNSTest::OtherRslt' ], |
18 | resultset_namespace => '+DBICNSTest::RSet', |
19 | ); |
20 | }, |
93d7452f |
21 | qr/load_namespaces found ResultSet class 'DBICNSTest::RSet::C' with no corresponding Result class/, |
ca507a2f |
22 | ); |
23 | }); |
44930c36 |
24 | |
25 | my $source_a = DBICNSTestOther->source('A'); |
26 | isa_ok($source_a, 'DBIx::Class::ResultSource::Table'); |
27 | my $rset_a = DBICNSTestOther->resultset('A'); |
28 | isa_ok($rset_a, 'DBICNSTest::RSet::A'); |
44930c36 |
29 | |
30 | my $source_b = DBICNSTestOther->source('B'); |
31 | isa_ok($source_b, 'DBIx::Class::ResultSource::Table'); |
32 | my $rset_b = DBICNSTestOther->resultset('B'); |
33 | isa_ok($rset_b, 'DBIx::Class::ResultSet'); |
f017c022 |
34 | |
35 | my $source_d = DBICNSTestOther->source('D'); |
36 | isa_ok($source_d, 'DBIx::Class::ResultSource::Table'); |
ca507a2f |
37 | |
38 | done_testing; |