fix typo in FATAL ERROR message.
[dbsrgits/DBIx-Class.git] / t / search / distinct.t
CommitLineData
d955e938 1use strict;
2use warnings;
3
4use Test::More;
d955e938 5
6use lib qw(t/lib);
7use DBIC::SqlMakerTest;
8use DBICTest;
9
10my $schema = DBICTest->init_schema();
11
12# make sure order + distinct do not double-inject group criteria
13my $year_rs = $schema->resultset ('CD')->search ({}, {
14 distinct => 1,
15 columns => [qw/year/],
16 order_by => 'year',
17});
18
19is_same_sql_bind (
20 $year_rs->as_query,
21 '(
22 SELECT me.year
23 FROM cd me
24 GROUP BY me.year
25 ORDER BY year
26 )',
27 [],
28 'Correct GROUP BY',
29);
30
31done_testing;