Skip to content

Commit

Permalink
Fix test failures with DBD::SQLite 1.38_02
Browse files Browse the repository at this point in the history
This is what fb88ca2 was supposed to fix in the first place >.<
  • Loading branch information
ribasushi committed Apr 21, 2013
1 parent 85aaaac commit 4497604
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions t/88result_set_column.t
Expand Up @@ -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',
);

Expand Down
4 changes: 3 additions & 1 deletion t/prefetch/incomplete.t
Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand All @@ -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'
);
Expand Down

0 comments on commit 4497604

Please sign in to comment.