Commit | Line | Data |
b9537280 |
1 | use strict; |
8273e845 |
2 | use warnings; |
b9537280 |
3 | |
e1f06f1c |
4 | use Test::More tests => 2; |
b9537280 |
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'); |
e1f06f1c |
11 | DBICTest::Schema->register_class('FooA', 'DBICTest::Schema::Artist'); |
b9537280 |
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'); |
fccc2e87 |
18 | |
19 | # clean up |
20 | DBICTest::Schema->_unregister_source('FooA'); |