X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Finflate%2Fhri.t;h=1d32dd6f4fbd112b33063f7f24c115f4c2edd4f2;hb=e8b32a6d045b4d04ba023d48be1c8e32065fcec6;hp=2bbaae88793945df82b61a5155b0f9bec6bfc0f4;hpb=0f2aa8f272df7753ada0601e0d4b00a712d86a2a;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/inflate/hri.t b/t/inflate/hri.t index 2bbaae8..1d32dd6 100644 --- a/t/inflate/hri.t +++ b/t/inflate/hri.t @@ -126,13 +126,12 @@ is_deeply [$rs_hashrefinf->all], \@hashrefinf, 'Check query using extended colum # check nested prefetching of has_many relationships which return nothing my $artist = $schema->resultset ('Artist')->create ({ name => 'unsuccessful artist without CDs'}); +$artist->discard_changes; my $rs_artists = $schema->resultset ('Artist')->search ({ 'me.artistid' => $artist->id}, { - prefetch => { cds => 'tracks' }, -}); -$rs_artists->result_class('DBIx::Class::ResultClass::HashRefInflator'); -my @artists_ok = ({ - artistid => $artist->id, - name => "unsuccessful artist without CDs", - cds => [], + prefetch => { cds => 'tracks' }, result_class => 'DBIx::Class::ResultClass::HashRefInflator', }); -is_deeply [$rs_artists->all], \@artists_ok, 'nested has_many prefetch without entries'; +is_deeply( + [$rs_artists->all], + [{ $artist->get_columns, cds => [] }], + 'nested has_many prefetch without entries' +);