From: Matt S Trout Date: Wed, 7 Dec 2005 01:37:55 +0000 (+0000) Subject: Classdata test from abraxxa X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=90e6de6c3dac0089fa0cea83db3251f3c6ca393d;p=dbsrgits%2FDBIx-Class-Historic.git Classdata test from abraxxa --- diff --git a/t/lib/DBICTest/Schema/Artist.pm b/t/lib/DBICTest/Schema/Artist.pm index dd0cfda..baf730a 100644 --- a/t/lib/DBICTest/Schema/Artist.pm +++ b/t/lib/DBICTest/Schema/Artist.pm @@ -6,4 +6,9 @@ DBICTest::Schema::Artist->table('artist'); DBICTest::Schema::Artist->add_columns(qw/artistid name/); DBICTest::Schema::Artist->set_primary_key('artistid'); +__PACKAGE__->mk_classdata('field_name_for', { + artistid => 'primary key', + name => 'artist name', +}); + 1; diff --git a/t/run/01core.tl b/t/run/01core.tl index a2c35b7..da0a6a3 100644 --- a/t/run/01core.tl +++ b/t/run/01core.tl @@ -1,6 +1,6 @@ sub run_tests { -plan tests => 28; +plan tests => 29; my @art = DBICTest::Artist->search({ }, { order_by => 'name DESC'}); @@ -112,6 +112,8 @@ eval { DBICTest::Track->load_components('DoesNotExist'); }; ok $@, $@; +is(DBICTest::Artist->field_name_for->{name}, 'artist name', 'mk_classdata usage ok'); + } 1;