diff options
author | Struan Donald <struan@exo.org.uk> | 2017-09-05 16:33:26 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2017-09-05 16:33:26 +0100 |
commit | 78dd21a18c6c4e95a267c07eb92f07dbc5b1f48e (patch) | |
tree | e5d85bddc916562bf50a8b0116e11e7ce2cbc292 /t/app/controller | |
parent | 8ad343eb7d2bfbee4db0ad1bb49c5480b458e262 (diff) | |
parent | 1391186c2fb56e46df5b124362e3facf6af173b5 (diff) |
Merge branch 'issues/forcouncils/220-ward-column-in-export'
Diffstat (limited to 't/app/controller')
-rw-r--r-- | t/app/controller/dashboard.t | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/t/app/controller/dashboard.t b/t/app/controller/dashboard.t index b87b58b38..5c0e19070 100644 --- a/t/app/controller/dashboard.t +++ b/t/app/controller/dashboard.t @@ -593,6 +593,7 @@ FixMyStreet::override_config { detail => "this report\nis split across\nseveral lines", state => "confirmed", conf_dt => DateTime->now(), + areas => 62883, } ); $mech->get_ok('/dashboard?export=1'); open my $data_handle, '<', \$mech->content; @@ -602,6 +603,36 @@ FixMyStreet::override_config { push @rows, $row; } is scalar @rows, 6, '1 (header) + 5 (reports) = 6 lines'; + + is scalar @{$rows[0]}, 18, '18 columns present'; + + is_deeply $rows[0], + [ + 'Report ID', + 'Title', + 'Detail', + 'User Name', + 'Category', + 'Created', + 'Confirmed', + 'Acknowledged', + 'Fixed', + 'Closed', + 'Status', + 'Latitude', + 'Longitude', + 'Nearest Postcode', + 'Ward', + 'Easting', + 'Northing', + 'Report URL', + ], + 'Column headers look correct'; + + is $rows[5]->[14], 'Bradford-on-Avon', 'Ward column is name not ID'; + + is $rows[5]->[15], '610591', 'Correct Easting conversion'; + is $rows[5]->[16], '126573', 'Correct Northing conversion'; }; }; restore_time; |