aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/Cobrand/TfL.pm11
-rw-r--r--t/cobrand/tfl.t8
2 files changed, 19 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/TfL.pm b/perllib/FixMyStreet/Cobrand/TfL.pm
index cab1e3ada..6bc6f9be5 100644
--- a/perllib/FixMyStreet/Cobrand/TfL.pm
+++ b/perllib/FixMyStreet/Cobrand/TfL.pm
@@ -108,6 +108,17 @@ sub admin_allow_user {
return $user->from_body->name eq 'TfL';
}
+sub state_groups_inspect {
+ my $rs = FixMyStreet::DB->resultset("State");
+ my @open = grep { $_ !~ /^(planned|action scheduled|for triage)$/ } FixMyStreet::DB::Result::Problem->open_states;
+ my @closed = grep { $_ ne 'closed' } FixMyStreet::DB::Result::Problem->closed_states;
+ [
+ [ $rs->display('confirmed'), \@open ],
+ [ $rs->display('fixed'), [ 'fixed - council' ] ],
+ [ $rs->display('closed'), \@closed ],
+ ]
+}
+
sub fetch_area_children {
my $self = shift;
diff --git a/t/cobrand/tfl.t b/t/cobrand/tfl.t
index abfb924ff..48bc6e46e 100644
--- a/t/cobrand/tfl.t
+++ b/t/cobrand/tfl.t
@@ -247,6 +247,14 @@ subtest 'Dashboard CSV extra columns' => sub {
$mech->content_contains(',,,yes,busstops@example.com,,' . $dt . ',"Council User"');
};
+subtest 'Inspect form state choices' => sub {
+ my $report = FixMyStreet::DB->resultset("Problem")->find({ title => 'Test Report 1'});
+ my $id = $report->id;
+ $mech->get_ok("/report/$id");
+ $mech->content_lacks('for triage');
+ $mech->content_lacks('action scheduled');
+};
+
subtest "change category, report resent to new location" => sub {
my $report = FixMyStreet::DB->resultset("Problem")->find({ title => 'Test Report 1'});
my $id = $report->id;