Test written.
[dbsrgits/DBIx-Class.git] / t / 39load_namespaces_rt41083.t
1 #!/usr/bin/perl
2
3 use strict;
4 use warnings;
5 use Test::More;
6
7 use lib 't/lib';
8
9 plan tests => 2;
10
11 my $warnings;
12 eval {
13     local $SIG{__WARN__} = sub { $warnings .= shift };
14     package DBICNSTest::RtBug41083;
15     use base 'DBIx::Class::Schema';
16     __PACKAGE__->load_namespaces(
17         result_namespace => 'Schema',
18         resultset_namespace => 'ResultSet',
19         default_resultset_class => 'ResultSet'
20     );
21 };
22 ok(!$@) or diag $@;
23 ok(
24         $warnings !~
25         qr/We found ResultSet class '([^']+)' for '([^']+)', but it seems that you had already set '([^']+)' to use '([^']+)' instead/,
26         'Proxy sub class did not generate an error'
27 );