X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F90join_torture.t;h=a277475f8daa884140804ab1e592fc04f18bee7d;hb=9c0df5f32b68e23c670c89ce6cdbff60b4bd0ed0;hp=12d2cdf40aa0a6b77dad0f359c32f8fc9f233463;hpb=0fc64feeac7aa7f880952140e6201617ca99af80;p=dbsrgits%2FDBIx-Class.git diff --git a/t/90join_torture.t b/t/90join_torture.t index 12d2cdf..a277475 100644 --- a/t/90join_torture.t +++ b/t/90join_torture.t @@ -6,7 +6,7 @@ use lib qw(t/lib); use DBICTest; my $schema = DBICTest->init_schema(); -plan tests => 20; +plan tests => 22; { my $rs = $schema->resultset( 'CD' )->search( @@ -119,4 +119,10 @@ eval { ok(!$@, "pathological prefetch ok"); +my $rs = $schema->resultset("Artist")->search({}, { join => 'twokeys' }); +my $second_search_rs = $rs->search({ 'cds_2.cdid' => '2' }, { join => +['cds', 'cds'] }); +is(scalar(@{$second_search_rs->{attrs}->{join}}), 3, 'both joins kept'); +ok($second_search_rs->next, 'query on double joined rel runs okay'); + 1;