X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Frun%2F01core.tl;h=412ac8f74133be7b6a7d7a6b77e6dca72e9e9817;hb=5ac6a04477849fabc50271c5b7ab15a080ae0109;hp=41a39418570e8f120bb37b2f93cdcfa37527e914;hpb=486ad69b83e990c883ce142c0a5b6c4f181f5584;p=dbsrgits%2FDBIx-Class.git diff --git a/t/run/01core.tl b/t/run/01core.tl index 41a3941..412ac8f 100644 --- a/t/run/01core.tl +++ b/t/run/01core.tl @@ -1,7 +1,7 @@ sub run_tests { my $schema = shift; -plan tests => 36; +plan tests => 38; my @art = $schema->resultset("Artist")->search({ }, { order_by => 'name DESC'}); @@ -99,6 +99,11 @@ is_deeply( \@cd, [qw/cdid artist title year/], 'column order'); $cd = $schema->resultset("CD")->search({ title => 'Spoonful of bees' }, { cols => ['title'] })->next; is($cd->title, 'Spoonful of bees', 'subset of columns returned correctly'); +$cd = $schema->resultset("CD")->search(undef, { include_columns => [ 'artist.name' ], join => [ 'artist' ] })->find(1); + +is($cd->title, 'Spoonful of bees', 'Correct CD returned with include'); +is($cd->get_column('name'), 'Caterwauler McCrae', 'Additional column returned'); + # insert_or_update $new = $schema->resultset("Track")->new( { trackid => 100,