X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Frun%2F16joins.tl;h=98a851585603699b62e88c13696e32341cc14f62;hb=bc09ebfa1b86dfad0385eeed33282182b77283ff;hp=89d9947a1aa51c5aa7d6ea72cdbae79c4df8138e;hpb=0567538f9dcf59ff0dcf0fe766815b242115ce20;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/run/16joins.tl b/t/run/16joins.tl index 89d9947..98a8515 100644 --- a/t/run/16joins.tl +++ b/t/run/16joins.tl @@ -6,7 +6,7 @@ BEGIN { eval "use DBD::SQLite"; plan $@ ? ( skip_all => 'needs DBD::SQLite for testing' ) - : ( tests => 21 ); + : ( tests => 22 ); } # test the abstract join => SQL generator @@ -115,10 +115,12 @@ my @cd = $rs->all; is($cd[0]->title, 'Spoonful of bees', 'First record returned ok'); -ok(!exists $cd[0]->{_relationship_data}{liner_notes}, 'No prefetch for NULL LEFT JOIN'); +ok(!defined $cd[0]->liner_notes, 'No prefetch for NULL LEFT join'); is($cd[1]->{_relationship_data}{liner_notes}->notes, 'Buy Whiskey!', 'Prefetch for present LEFT JOIN'); +is(ref $cd[1]->liner_notes, 'DBICTest::LinerNotes', 'Prefetch returns correct class'); + is($cd[2]->{_inflated_column}{artist}->name, 'Caterwauler McCrae', 'Prefetch on parent object ok'); # count the SELECTs