aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2020-07-14 14:10:33 +0100
committerMatthew Somerville <matthew@mysociety.org>2020-07-14 18:21:10 +0100
commit0e78353e0afb2e074b91a8cbaeae2a1f3715fea8 (patch)
tree732c64b620cbc1c83b6a858f84ec2540dd07d990
parent3d2b2efe9e475b8b00d9ec170283f0c987d1adbd (diff)
[.com] Fix original-reporter-only update message.
The function call was changed/renamed in 4fe75bb17.
-rw-r--r--t/cobrand/isleofwight.t13
-rw-r--r--templates/web/fixmystreet.com/report/_updates_disallowed_message.html2
2 files changed, 13 insertions, 2 deletions
diff --git a/t/cobrand/isleofwight.t b/t/cobrand/isleofwight.t
index 3cac710da..303cdbc07 100644
--- a/t/cobrand/isleofwight.t
+++ b/t/cobrand/isleofwight.t
@@ -116,13 +116,24 @@ subtest "only original reporter can comment" => sub {
};
};
+subtest "only original reporter can comment" => sub {
+ FixMyStreet::override_config {
+ MAPIT_URL => 'http://mapit.uk/',
+ ALLOWED_COBRANDS => 'fixmystreet',
+ COBRAND_FEATURES => { updates_allowed => { fixmystreet => { 'Isle of Wight' => 'reporter' } } },
+ }, sub {
+ $mech->log_out_ok;
+ $mech->get_ok('/report/' . $reports[0]->id);
+ $mech->content_contains('Only the original reporter may leave updates');
+ };
+};
+
subtest "check moderation label uses correct name" => sub {
my $REPORT_URL = '/report/' . $reports[0]->id;
FixMyStreet::override_config {
MAPIT_URL => 'http://mapit.uk/',
ALLOWED_COBRANDS => ['isleofwight'],
}, sub {
- $mech->log_out_ok;
$mech->log_in_ok( $iow_user->email );
$mech->get_ok($REPORT_URL);
$mech->content_lacks('show-moderation');
diff --git a/templates/web/fixmystreet.com/report/_updates_disallowed_message.html b/templates/web/fixmystreet.com/report/_updates_disallowed_message.html
index d2d9cf83b..d7b3d383a 100644
--- a/templates/web/fixmystreet.com/report/_updates_disallowed_message.html
+++ b/templates/web/fixmystreet.com/report/_updates_disallowed_message.html
@@ -1,4 +1,4 @@
-[% cfg = c.cobrand.updates_disallowed_config(problem).0 ~%]
+[% cfg = c.cobrand.per_body_config('updates_allowed', problem).0 ~%]
[% IF cfg.match('reporter') AND (NOT cfg.match('open') OR problem.is_open) %]
<p>
Only the original reporter may leave updates.