Some cleanup
[dbsrgits/DBIx-Class.git] / t / 63register_class.t
CommitLineData
b9537280 1use strict;
2use warnings;
3
e1f06f1c 4use Test::More tests => 2;
b9537280 5use lib qw(t/lib);
6use DBICTest;
7use DBICTest::Schema;
8use DBICTest::Schema::Artist;
9
10DBICTest::Schema::Artist->source_name('MyArtist');
e1f06f1c 11DBICTest::Schema->register_class('FooA', 'DBICTest::Schema::Artist');
b9537280 12
13my $schema = DBICTest->init_schema();
14
15my $a = $schema->resultset('FooA')->search;
16is($a->count, 3, 'have 3 artists');
17is($schema->class('FooA'), 'DBICTest::FooA', 'Correct artist class');
fccc2e87 18
19# clean up
20DBICTest::Schema->_unregister_source('FooA');