aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-10-10 09:59:05 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-10-10 09:59:13 +0100
commit70a19127923a54eee5ad16f1bb1b97675273bceb (patch)
treef9def44162a66840686d9a5e2e77a60e42543ddf
parent6ade3433e5fe25d7011a168946c492538fcc0653 (diff)
Tweak dashboard test for less output.
-rw-r--r--t/app/controller/dashboard.t13
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();