diff options
author | Matthew Somerville <matthew@mysociety.org> | 2020-05-07 12:44:23 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2020-05-07 14:40:17 +0100 |
commit | 5ce552af2b66613272dc9cfe2d46532e057f44f7 (patch) | |
tree | 660f00556af91fecbd64386b1c23c6ca54ca20f3 /t/app/controller/dashboard.t | |
parent | cfabb3cfd4474c1c812ed325a068d56bafc43a08 (diff) |
Fix dashboard report CSV export.
The change to join in e16054150 did not include a collapse that the
previous prefetch was doing, so multiple rows per result were being
returned.
Diffstat (limited to 't/app/controller/dashboard.t')
-rw-r--r-- | t/app/controller/dashboard.t | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/t/app/controller/dashboard.t b/t/app/controller/dashboard.t index 72fc00128..c62ada89a 100644 --- a/t/app/controller/dashboard.t +++ b/t/app/controller/dashboard.t @@ -70,6 +70,7 @@ foreach my $problem (@fixed_problems) { foreach my $problem (@closed_problems) { $problem->update({ state => 'closed' }); + $mech->create_comment_for_problem($problem, $counciluser, 'Name', 'in progress text', 0, 'confirmed', 'in progress'); $mech->create_comment_for_problem($problem, $counciluser, 'Title', 'text', 0, 'confirmed', 'closed'); } @@ -214,7 +215,7 @@ FixMyStreet::override_config { subtest 'export updates as csv' => sub { $mech->get_ok('/dashboard?updates=1&export=1'); my @rows = $mech->content_as_csv; - is scalar @rows, 15, '1 (header) + 14 (updates) = 15 lines'; + is scalar @rows, 18, '1 (header) + 17 (updates) = 18 lines'; is scalar @{$rows[0]}, 8, '8 columns present'; is_deeply $rows[0], |