From: Peter Rabbitson Date: Thu, 30 Apr 2009 07:10:36 +0000 (+0000) Subject: Add joined count test X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=21bd38f8cef336a99d0f174cca6da55df47b9d14;p=dbsrgits%2FDBIx-Class-Historic.git Add joined count test --- diff --git a/t/count_distinct.t b/t/count/count_distinct.t similarity index 100% rename from t/count_distinct.t rename to t/count/count_distinct.t diff --git a/t/count/count_joined.t b/t/count/count_joined.t new file mode 100644 index 0000000..db69ba6 --- /dev/null +++ b/t/count/count_joined.t @@ -0,0 +1,15 @@ +use strict; +use warnings; + +use Test::More; + +use lib qw(t/lib); + +use DBICTest; + +plan tests => 1; + +my $schema = DBICTest->init_schema(); + +my $cds = $schema->resultset("CD")->search({ cdid => 1 }, { join => { cd_to_producer => 'producer' } }); +is($cds->count, 1, "extra joins do not explode single entity count");