Classdata test from abraxxa
[dbsrgits/DBIx-Class.git] / t / run / 01core.tl
index d97f31f..da0a6a3 100644 (file)
@@ -1,6 +1,6 @@
 sub run_tests {
 
-plan tests => 27; 
+plan tests => 29; 
 
 my @art = DBICTest::Artist->search({ }, { order_by => 'name DESC'});
 
@@ -90,6 +90,9 @@ is($cd->year, 2005, 'set_columns ok');
 
 $cd->discard_changes;
 
+$cd = DBICTest::CD->search({ title => 'Spoonful of bees' }, { cols => ['title'] })->next;
+is($cd->title, 'Spoonful of bees', 'subset of columns returned correctly');
+
 # insert_or_update
 $new = DBICTest::Track->new( {
   trackid => 100,
@@ -109,6 +112,8 @@ eval { DBICTest::Track->load_components('DoesNotExist'); };
 
 ok $@, $@;
 
+is(DBICTest::Artist->field_name_for->{name}, 'artist name', 'mk_classdata usage ok');
+
 }
 
 1;