From 70a19127923a54eee5ad16f1bb1b97675273bceb Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Wed, 10 Oct 2018 09:59:05 +0100 Subject: Tweak dashboard test for less output. --- t/app/controller/dashboard.t | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 't/app/controller/dashboard.t') 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(); -- cgit v1.2.3