X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F60core.t;h=de290de7f4db9157e098aafd8c141859c7703d45;hb=11d68671189252ea241d119283f75d074cd4457c;hp=dd41f38bf65e2429070d3c944b6ac57ffda70c02;hpb=d2f21b377c36ca386492605c7b2c571eed09c0f6;p=dbsrgits%2FDBIx-Class.git diff --git a/t/60core.t b/t/60core.t index dd41f38..de290de 100644 --- a/t/60core.t +++ b/t/60core.t @@ -8,7 +8,7 @@ use DBICTest; my $schema = DBICTest->init_schema(); -plan tests => 95; +plan tests => 96; eval { require DateTime::Format::MySQL }; my $NO_DTFM = $@ ? 1 : 0; @@ -247,18 +247,28 @@ SKIP: { my $tcount = $schema->resultset('Track')->search( {}, { - select => [ qw/position title/ ] + select => [ qw/position title/ ], + distinct => 1, } ); is($tcount->count, 13, 'multiple column COUNT DISTINCT ok'); - $tcount = $schema->resultset('Track')->search( - {}, - { - group_by => [ qw/position title/ ] - } - ); - is($tcount->count, 13, 'multiple column COUNT DISTINCT using column syntax ok'); + $tcount = $schema->resultset('Track')->search( + {}, + { + columns => [ qw/position title/ ], + distinct => 1, + } + ); + is($tcount->count, 13, 'multiple column COUNT DISTINCT ok'); + + $tcount = $schema->resultset('Track')->search( + {}, + { + group_by => [ qw/position title/ ] + } + ); + is($tcount->count, 13, 'multiple column COUNT DISTINCT using column syntax ok'); } my $tag_rs = $schema->resultset('Tag')->search(