From: Peter Rabbitson Date: Sun, 21 Apr 2013 07:23:30 +0000 (+0200) Subject: Fix test failures with DBD::SQLite 1.38_02 X-Git-Tag: v0.08250~17 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=449760452303b9084eb3f8cc7bc12dc917eae748;p=dbsrgits%2FDBIx-Class.git Fix test failures with DBD::SQLite 1.38_02 This is what fb88ca2c was supposed to fix in the first place >.< --- diff --git a/t/88result_set_column.t b/t/88result_set_column.t index 320f3fe..c26f207 100644 --- a/t/88result_set_column.t +++ b/t/88result_set_column.t @@ -145,8 +145,8 @@ is ($owner->search_related ('books')->get_column ('price')->sum, 60, 'Correctly $rs->reset; my $j_rs = $rs->search ({}, { join => 'tracks' })->get_column ('cdid'); is_deeply ( - [ $j_rs->all ], - [ map { my $c = $rs->next; ( ($c->id) x $c->tracks->count ) } (1 .. $rs->count) ], + [ sort $j_rs->all ], + [ sort map { my $c = $rs->next; ( ($c->id) x $c->tracks->count ) } (1 .. $rs->count) ], 'join properly explodes amount of rows from get_column', ); diff --git a/t/prefetch/incomplete.t b/t/prefetch/incomplete.t index fe939cd..09df99c 100644 --- a/t/prefetch/incomplete.t +++ b/t/prefetch/incomplete.t @@ -55,6 +55,7 @@ lives_ok ( sub { for my $tr ($cd->tracks->all) { push @{$data->{tracks}}, { $tr->get_columns }; } + @{$data->{tracks}} = sort { $a->{trackid} <=> $b->{trackid} } @{$data->{tracks}}; push @cds_and_tracks, $data; } @@ -66,6 +67,7 @@ lives_ok ( sub { for my $tr ($cd->tracks->all) { push @{$data->{tracks}}, { $tr->get_columns }; } + @{$data->{tracks}} = sort { $a->{trackid} <=> $b->{trackid} } @{$data->{tracks}}; push @pref_cds_and_tracks, $data; } @@ -76,7 +78,7 @@ lives_ok ( sub { ); cmp_deeply ( - [ $pref_rs->search ({}, { result_class => 'DBIx::Class::ResultClass::HashRefInflator' })->all ], + $pref_rs->search ({}, { order_by => [ { -desc => 'me.year' }, 'trackid' ] })->all_hri, \@cds_and_tracks, 'Correct HRI collapsing on non-unique primary object' );