aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/DB/Result/Problem.pm2
-rw-r--r--t/cobrand/isleofwight.t14
2 files changed, 14 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm
index 8159d7251..08b768719 100644
--- a/perllib/FixMyStreet/DB/Result/Problem.pm
+++ b/perllib/FixMyStreet/DB/Result/Problem.pm
@@ -751,7 +751,7 @@ sub defect_types {
# Note: this only makes sense when called on a problem that has been sent!
sub can_display_external_id {
my $self = shift;
- if ($self->external_id && $self->to_body_named('Oxfordshire|Lincolnshire')) {
+ if ($self->external_id && $self->to_body_named('Oxfordshire|Lincolnshire|Isle of Wight')) {
return 1;
}
return 0;
diff --git a/t/cobrand/isleofwight.t b/t/cobrand/isleofwight.t
index 8afc2f29b..ddca0b97c 100644
--- a/t/cobrand/isleofwight.t
+++ b/t/cobrand/isleofwight.t
@@ -29,7 +29,8 @@ my @reports = $mech->create_problems_for_body(1, $isleofwight->id, 'An Isle of w
lastupdate => '2019-05-25 09:00',
latitude => 50.7108,
longitude => -1.29573,
- user => $user
+ user => $user,
+ external_id => 101202303
});
subtest "check clicking all reports link" => sub {
@@ -45,6 +46,17 @@ subtest "check clicking all reports link" => sub {
$mech->content_contains("Island Roads", "is still on cobrand");
};
+subtest "use external id for reference number" => sub {
+ FixMyStreet::override_config {
+ MAPIT_URL => 'http://mapit.uk/',
+ ALLOWED_COBRANDS => 'isleofwight',
+ }, sub {
+ $mech->get_ok('/report/' . $reports[0]->id);
+ };
+
+ $mech->content_contains("101202303", "Display external id as reference number");
+};
+
subtest "only original reporter can comment" => sub {
FixMyStreet::override_config {
MAPIT_URL => 'http://mapit.uk/',