From: David Kamholz Date: Thu, 6 Jul 2006 22:38:31 +0000 (+0000) Subject: insanify test X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3583d755a4e20f3f2ab99e33636fcc320668b909;p=dbsrgits%2FDBIx-Class-Historic.git insanify test --- diff --git a/t/76joins.t b/t/76joins.t index d09650d..d36fe44 100644 --- a/t/76joins.t +++ b/t/76joins.t @@ -303,10 +303,14 @@ $tree_like = $schema->resultset('TreeLike')->search({ 'children.id' => 2 }); $tree_like = $tree_like->search_related('children', undef, { prefetch => { children => 'children' } })->first; is($tree_like->children->first->children->first->name, 'quux', 'Tree search_related with prefetch ok'); +$schema->storage->debugcb(undef); +$schema->storage->debug(1); $tree_like = $schema->resultset('TreeLike')->search( { 'children.id' => 2, 'children_2.id' => 5 }, - { join => [qw/children children/] })->first; -is($tree_like->name, 'foo', 'Tree with multiple has_many joins ok'); + { join => [qw/children children/] } + )->search_related('children', { 'children_3.id' => 3 }, { prefetch => 'children' } + )->first->children->first; +is($tree_like->name, 'baz', 'Tree with multiple has_many joins ok'); # test that collapsed joins don't get a _2 appended to the alias