X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Frun%2F01core.tl;h=27868df99d7816893b1dfff0e750900e0d367153;hb=6157db4fe181ba8dbd4518aed34b8f9141083418;hp=ce41f1687712e08eb98a5145b7c3c21188c062e3;hpb=8c49f6295f3c7e07ba4bda6379f3c9f065501d7a;p=dbsrgits%2FDBIx-Class.git diff --git a/t/run/01core.tl b/t/run/01core.tl index ce41f16..27868df 100644 --- a/t/run/01core.tl +++ b/t/run/01core.tl @@ -1,7 +1,7 @@ sub run_tests { my $schema = shift; -plan tests => 34; +plan tests => 36; my @art = $schema->resultset("Artist")->search({ }, { order_by => 'name DESC'}); @@ -91,10 +91,10 @@ is($cd->year, 2005, 'set_columns ok'); $cd->discard_changes; -# check whether ResultSource->ordered_columns returns columns in order originally supplied -my @cd = $schema->source("CD")->ordered_columns; +# check whether ResultSource->columns returns columns in order originally supplied +my @cd = $schema->source("CD")->columns; -is_deeply( \@cd, [qw/cdid artist title year/], 'ordered_columns'); +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'); @@ -140,6 +140,13 @@ cmp_ok($rel_rs->count, '==', 5, 'Related search ok'); cmp_ok($or_rs->next->cdid, '==', $rel_rs->next->cdid, 'Related object ok'); + +ok($schema->storage(), 'Storage available'); + +$schema->source("Artist")->{_columns}{'artistid'} = {}; + +my $typeinfo = $schema->source("Artist")->column_info('artistid'); +is($typeinfo->{data_type}, 'INTEGER', 'column_info ok'); } 1;