diff options
Diffstat (limited to 't')
-rw-r--r-- | t/app/controller/dashboard.t | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/t/app/controller/dashboard.t b/t/app/controller/dashboard.t index 3a031bec3..26c19f596 100644 --- a/t/app/controller/dashboard.t +++ b/t/app/controller/dashboard.t @@ -236,15 +236,12 @@ FixMyStreet::override_config { sub test_table { my ($content, @expected) = @_; my $res = $categories->scrape( $mech->content ); - my $i = 0; + my @actual; foreach my $row ( @{ $res->{rows} }[1 .. 11] ) { - foreach my $col ( @{ $row->{cols} } ) { - is $col, $expected[$i++]; - } + push @actual, @{$row->{cols}} if $row->{cols}; } + is_deeply \@actual, \@expected; } -END { - restore_time; - done_testing(); -} +restore_time; +done_testing(); |