aboutsummaryrefslogtreecommitdiffstats
path: root/t/app
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-11-05 18:01:20 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-11-07 08:42:53 +0000
commit702d0747e13882b46186578291dcd2f4ce17d38a (patch)
treeddbd416b62ef6a685da0ce47fcec4c0ab88bf7da /t/app
parent31a49cd1cad097548171b6daa3ff68be6ae01e6c (diff)
Allow moderation to edit category.
Diffstat (limited to 't/app')
-rw-r--r--t/app/controller/moderate.t12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/app/controller/moderate.t b/t/app/controller/moderate.t
index 9f6bc7450..00de29dd1 100644
--- a/t/app/controller/moderate.t
+++ b/t/app/controller/moderate.t
@@ -248,6 +248,18 @@ subtest 'Problem moderation' => sub {
is $report->get_extra_metadata('weather'), 'snow';
};
+ subtest 'Moderate category' => sub {
+ $report->update;
+ my ($csrf) = $mech->content =~ /meta content="([^"]*)" name="csrf-token"/;
+ $mech->post_ok('http://www.example.org/moderate/report/' . $report->id, {
+ %problem_prepopulated,
+ 'category' => 'Lost toys',
+ token => $csrf,
+ });
+ $report->discard_changes;
+ is $report->category, 'Lost toys';
+ };
+
subtest 'Moderate location' => sub {
FixMyStreet::override_config {
MAPIT_URL => 'http://mapit.uk/',