Add joined count test
Peter Rabbitson [Thu, 30 Apr 2009 07:10:36 +0000 (07:10 +0000)]
t/count/count_distinct.t [moved from t/count_distinct.t with 100% similarity]
t/count/count_joined.t [new file with mode: 0644]

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 (file)
index 0000000..db69ba6
--- /dev/null
@@ -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");