X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fprefetch%2Fmultiple_hasmany.t;h=7e8b742250fa1bfbe23ded60b6931729b9696f1c;hb=5e8cb53cf70528d4e17526dba967cff67e13cde9;hp=ca89d55b84db97de5404fb088bb24c4aea1e30b6;hpb=a2287768f5c3dd665c469d7f9dfe99d369ff6781;p=dbsrgits%2FDBIx-Class.git diff --git a/t/prefetch/multiple_hasmany.t b/t/prefetch/multiple_hasmany.t index ca89d55..7e8b742 100644 --- a/t/prefetch/multiple_hasmany.t +++ b/t/prefetch/multiple_hasmany.t @@ -48,18 +48,13 @@ TODO: { $schema->storage->debug ($sdebug); is($pr_tracks_count, $tracks_count, 'equal count of prefetched relations over several same level has_many\'s (1 -> M + M)'); - - for ($pr_tracks_rs, $tracks_rs) { - $_->result_class ('DBIx::Class::ResultClass::HashRefInflator'); - } - - is_deeply ([$pr_tracks_rs->all], [$tracks_rs->all], 'same structure returned with and without prefetch over several same level has_many\'s (1 -> M + M)'); + is ($pr_tracks_rs->all, $tracks_rs->all, 'equal amount of objects returned with and without prefetch over several same level has_many\'s (1 -> M + M)'); #( M -> 1 -> M + M ) my $note_rs = $schema->resultset('LinerNotes')->search ({ notes => 'Buy Whiskey!' }); my $pr_note_rs = $note_rs->search ({}, { prefetch => { - cd => [qw/tags tracks/] + cd => [qw/tracks tags/] }, }); @@ -86,12 +81,7 @@ TODO: { $schema->storage->debug ($sdebug); is($pr_tags_count, $tags_count, 'equal count of prefetched relations over several same level has_many\'s (M -> 1 -> M + M)'); - - for ($pr_tags_rs, $tags_rs) { - $_->result_class ('DBIx::Class::ResultClass::HashRefInflator'); - } - - is_deeply ([$pr_tags_rs->all], [$tags_rs->all], 'same structure returned with and without prefetch over several same level has_many\'s (M -> 1 -> M + M)'); + is($pr_tags_rs->all, $tags_rs->all, 'equal amount of objects with and without prefetch over several same level has_many\'s (M -> 1 -> M + M)'); } # remove this closure once the TODO above is working