From: Matt S Trout Date: Wed, 22 Nov 2006 05:30:06 +0000 (+0000) Subject: class reg test X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b9537280fd9a38dc4856a286b1920dfc16978b11;p=dbsrgits%2FDBIx-Class-Historic.git class reg test --- diff --git a/t/63register_class.t b/t/63register_class.t new file mode 100644 index 0000000..2fdc07c --- /dev/null +++ b/t/63register_class.t @@ -0,0 +1,17 @@ +use strict; +use warnings; + +use Test::More tests => 2; +use lib qw(t/lib); +use DBICTest; +use DBICTest::Schema; +use DBICTest::Schema::Artist; + +DBICTest::Schema::Artist->source_name('MyArtist'); +DBICTest::Schema->register_class('FooA', 'DBICTest::Schema::Artist'); + +my $schema = DBICTest->init_schema(); + +my $a = $schema->resultset('FooA')->search; +is($a->count, 3, 'have 3 artists'); +is($schema->class('FooA'), 'DBICTest::FooA', 'Correct artist class');