eval "use DBD::SQLite";
plan skip_all => 'needs DBD::SQLite for testing' if $@;
-plan tests => 18;
+plan tests => 19;
# The tag Blue is assigned to cds 1 2 3 and 5
# The tag Cheesy is assigned to cds 2 4 and 5
$rs = $schema->resultset('Tag')->search({ tag => \" IN ('Blue', 'Cheesy')" }, { group_by => [ qw/tag cd/ ] });
is($rs->count, 7, 'Count with literal SQL and multiple group_by');
+$rs = $schema->resultset('Tag')->search({}, {
+ select => { length => 'tag' },
+ distinct => 1
+});
+is($rs->count, 3, 'Count by distinc result of function');
+
my @warnings;
{
local $SIG{__WARN__} = sub { push @warnings, shift };