Not sure what I was thinking, but 18637ebb never worked :/
[dbsrgits/DBIx-Class.git] / t / 40resultsetmanager.t
CommitLineData
762a7bb2 1use strict;
2use warnings;
3use Test::More;
e42bbd7f 4use Test::Warn;
762a7bb2 5
6use lib qw(t/lib);
8d6b1478 7use DBICTest;
762a7bb2 8
e42bbd7f 9warnings_exist { require DBICTest::ResultSetManager }
10 [
11 qr/\QDBIx::Class::ResultSetManager never left experimental status/,
12 ],
13 'found deprecation warning'
14;
da0d740f 15
11357d09 16my $schema = DBICTest::ResultSetManager->compose_namespace('DB');
762a7bb2 17my $rs = $schema->resultset('Foo');
18
19ok( !DB::Foo->can('bar'), 'Foo class does not have bar method' );
20ok( $rs->can('bar'), 'Foo resultset class has bar method' );
b1fb2c94 21isa_ok( $rs, 'DBICTest::ResultSetManager::Foo::_resultset', 'Foo resultset class is correct' );
cc6504dc 22is( $rs->bar, 'good', 'bar method works' );
68de9438 23
24done_testing;