aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/dashboard.t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-08-23 13:58:34 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-08-31 15:37:09 +0100
commit986c97311c4cb1f3ec092c0605dcb15ab2527da1 (patch)
tree870c91b9c680a30c42109d5d93aefdb164b6f819 /t/app/controller/dashboard.t
parent27110ac506f071ad0c5925ef74de1321514c23c8 (diff)
Remove hardcoded states from templates.
State display names are now got from the database wherever they are displayed, including admin dropdowns, list filters, and update meta statements. This also covers the open/closed/fixed 'groups'. This also fixes a bug whereby if e.g. an update has problem_state investigating, the next update has no problem_state, and the last update has investigating again, it was previously showing a state change to investigating on that third update.
Diffstat (limited to 't/app/controller/dashboard.t')
-rw-r--r--t/app/controller/dashboard.t17
1 files changed, 3 insertions, 14 deletions
diff --git a/t/app/controller/dashboard.t b/t/app/controller/dashboard.t
index 9d424c1ae..b87b58b38 100644
--- a/t/app/controller/dashboard.t
+++ b/t/app/controller/dashboard.t
@@ -545,22 +545,11 @@ FixMyStreet::override_config {
},
{
desc => 'limit by state works',
- state => 'fixed',
+ state => 'fixed - council',
report_counts => [2,0,0],
report_counts_after => [1,0,0],
},
{
- desc => 'planned counted as action scheduled',
- p1 => {
- state => 'planned',
- conf_dt => DateTime->now(),
- category => 'Potholes',
- },
- state => 'action scheduled',
- report_counts => [3,0,0],
- report_counts_after => [1,0,0],
- },
- {
desc => 'All fixed states count as fixed',
p1 => {
state => 'fixed - council',
@@ -573,7 +562,7 @@ FixMyStreet::override_config {
category => 'Potholes',
},
state => 'fixed',
- report_counts => [5,0,0],
+ report_counts => [4,0,0],
report_counts_after => [3,0,0],
},
) {
@@ -612,7 +601,7 @@ FixMyStreet::override_config {
while ( my $row = $csv->getline( $data_handle ) ) {
push @rows, $row;
}
- is scalar @rows, 7, '1 (header) + 6 (reports) = 7 lines';
+ is scalar @rows, 6, '1 (header) + 5 (reports) = 6 lines';
};
};
restore_time;