LEFT join problem fixed
[dbsrgits/DBIx-Class.git] / t / 76joins.t
index f384d4d..89c619d 100644 (file)
@@ -336,21 +336,18 @@ SKIP: {
 
 is($rs->next->name, 'Caterwauler McCrae', "Correct artist returned");
 
-TODO:  {
-    local $TODO = 'left join on prefetch to return valid rows';
-    my $cd = $schema->resultset('Artist')->first->create_related('cds',
-        {
-        title   => 'Unproduced Single',
-        year    => 2007
-    });
-
-    my $left_join = $schema->resultset('CD')->search(
-        { 'me.cdid' => $cd->cdid },
-        { prefetch => { cd_to_producer => 'producer' } }
-    );
-
-    cmp_ok($left_join, '==', 1, 'prefetch with no join record present');
-}
+my $cd = $schema->resultset('Artist')->first->create_related('cds',
+    {
+    title   => 'Unproduced Single',
+    year    => 2007
+});
+
+my $left_join = $schema->resultset('CD')->search(
+    { 'me.cdid' => $cd->cdid },
+    { prefetch => { cd_to_producer => 'producer' } }
+);
+
+cmp_ok($left_join, '==', 1, 'prefetch with no join record present');
 
 $queries = 0;
 $schema->storage->debugcb(sub { $queries++ });