aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2019-12-10 17:25:36 +0000
committerMatthew Somerville <matthew@mysociety.org>2019-12-11 07:31:36 +0000
commit9ff66d77bc44dbbb3d17512c8edc0f0f3334986d (patch)
tree025d0b80efe956fe36e9834747b59657399e991c
parent6ea3d7f26b8b54ed52e0a90f1e4d7976081c4e3f (diff)
[TfL] Do not say council in not responsible.
-rw-r--r--perllib/FixMyStreet/DB/ResultSet/State.pm4
-rw-r--r--t/cobrand/isleofwight.t3
-rw-r--r--t/cobrand/tfl.t13
3 files changed, 18 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/DB/ResultSet/State.pm b/perllib/FixMyStreet/DB/ResultSet/State.pm
index cb894005f..4f98efbf2 100644
--- a/perllib/FixMyStreet/DB/ResultSet/State.pm
+++ b/perllib/FixMyStreet/DB/ResultSet/State.pm
@@ -1,6 +1,7 @@
package FixMyStreet::DB::ResultSet::State;
use base 'DBIx::Class::ResultSet';
+use utf8;
use strict;
use warnings;
use Memcached;
@@ -74,7 +75,8 @@ sub display {
return $unchanging->{$label} if $unchanging->{$label};
if ($cobrand && $label eq 'not responsible') {
return 'third party responsibility' if $cobrand eq 'bromley';
- return "not Island Roads' responsibility" if $cobrand eq 'isleofwight';
+ return "not Island Roads’ responsibility" if $cobrand eq 'isleofwight';
+ return "not TfL’s responsibility" if $cobrand eq 'tfl';
return _("not the council's responsibility");
}
if ($cobrand && $cobrand eq 'oxfordshire' && $label eq 'unable to fix') {
diff --git a/t/cobrand/isleofwight.t b/t/cobrand/isleofwight.t
index bd837b3c6..0c985e2fb 100644
--- a/t/cobrand/isleofwight.t
+++ b/t/cobrand/isleofwight.t
@@ -1,3 +1,4 @@
+use utf8;
use CGI::Simple;
use DateTime;
use Test::MockModule;
@@ -425,7 +426,7 @@ subtest "check not responsible as correct text" => sub {
$mech->get_ok('/report/' . $p->id);
};
- $mech->content_contains("not Island Roads&#39; responsibility", "not reponsible message contains correct text");
+ $mech->content_contains("not Island Roads’ responsibility", "not reponsible message contains correct text");
$p->comments->delete;
$p->delete;
};
diff --git a/t/cobrand/tfl.t b/t/cobrand/tfl.t
index 287a8c98e..9624a6aae 100644
--- a/t/cobrand/tfl.t
+++ b/t/cobrand/tfl.t
@@ -813,6 +813,19 @@ FixMyStreet::override_config {
$staffuser->unset_extra_metadata('2fa_secret');
$staffuser->update;
};
+
+ subtest "check not responsible as correct text" => sub {
+ my ($p) = $mech->create_problems_for_body(1, $body->id, 'NotResp');
+ my $c = FixMyStreet::DB->resultset('Comment')->create({
+ problem => $p, user => $p->user, anonymous => 't', text => 'Update text',
+ problem_state => 'not responsible', state => 'confirmed', mark_fixed => 0,
+ confirmed => DateTime->now(),
+ });
+ $mech->get_ok('/report/' . $p->id);
+ $mech->content_contains("not TfL’s responsibility", "not reponsible message contains correct text");
+ $p->comments->delete;
+ $p->delete;
+ };
};
FixMyStreet::override_config {