sub run_tests {
my $schema = shift;
-plan tests => 36;
+plan tests => 39;
my @art = $schema->resultset("Artist")->search({ }, { order_by => 'name DESC'});
$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,
my $typeinfo = $schema->source("Artist")->column_info('artistid');
is($typeinfo->{data_type}, 'INTEGER', 'column_info ok');
+$schema->source("Artist")->column_info('artistid');
+ok($schema->source("Artist")->{_columns_info_loaded} == 1, 'Columns info flag set');
+
}
1;