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