diff options
author | Struan Donald <struan@exo.org.uk> | 2011-06-27 17:28:07 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2011-06-27 17:28:07 +0100 |
commit | 0c3c4a0be17118ff4d8e01168df5938a947f28f6 (patch) | |
tree | 5604f141fa32f8a11e7398253bb8b1ed841fd549 | |
parent | d40180650fbc0060c3d8cfbf9db60ca61b0e7e3a (diff) |
council users should be able to set state to confirmed
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report/Update.pm | 2 | ||||
-rw-r--r-- | t/app/controller/report_updates.t | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/Update.pm b/perllib/FixMyStreet/App/Controller/Report/Update.pm index 652694595..1ea0e88b4 100644 --- a/perllib/FixMyStreet/App/Controller/Report/Update.pm +++ b/perllib/FixMyStreet/App/Controller/Report/Update.pm @@ -181,7 +181,7 @@ sub check_for_errors : Private { $error = 1 unless $c->user && $c->user->from_council && $c->user->from_council == $c->stash->{update}->problem->council; my $state = $c->req->param('state'); - $error = 1 unless ( grep { $state eq $_ } ( qw/closed fixed investigating planned/, 'in progress', 'fixed', 'fixed - user', 'fixed - council' ) ); + $error = 1 unless ( grep { $state eq $_ } ( qw/confirmed closed fixed investigating planned/, 'in progress', 'fixed', 'fixed - user', 'fixed - council' ) ); if ( $error ) { $c->stash->{errors} ||= []; diff --git a/t/app/controller/report_updates.t b/t/app/controller/report_updates.t index 16165e8ae..72006dca8 100644 --- a/t/app/controller/report_updates.t +++ b/t/app/controller/report_updates.t @@ -510,6 +510,18 @@ for my $test ( }, state => 'fixed - council', }, + { + desc => 'from authority user marks report as confirmed', + fields => { + name => $user->name, + may_show_name => 1, + add_alert => 0, + photo => '', + update => 'Set state to investigating', + state => 'confirmed', + }, + state => 'confirmed', + }, ) { subtest $test->{desc} => sub { $report->comments->delete; |