diff options
author | Struan Donald <struan@exo.org.uk> | 2019-07-19 12:40:02 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2019-09-27 17:35:15 +0100 |
commit | 72bda2b108f574d3ed5a9de78a9a7698a01635d4 (patch) | |
tree | 7d8a4d623e6b220ef7c9cc98aab19e6e740a2e3c | |
parent | 1b23e5f8933d9f01fc01102fe3a0d9c7efdd4ae0 (diff) |
[IsleOfWight] include FMS prefix on updates sent over open311
-rw-r--r-- | perllib/FixMyStreet/Cobrand/IsleOfWight.pm | 2 | ||||
-rw-r--r-- | t/cobrand/isleofwight.t | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Cobrand/IsleOfWight.pm b/perllib/FixMyStreet/Cobrand/IsleOfWight.pm index 462449d9b..ff7b23f2d 100644 --- a/perllib/FixMyStreet/Cobrand/IsleOfWight.pm +++ b/perllib/FixMyStreet/Cobrand/IsleOfWight.pm @@ -73,6 +73,8 @@ sub open311_munge_update_params { if ($comment->mark_fixed) { $params->{description} = "[The customer indicated that this issue had been fixed]\n\n" . $params->{description}; } + + $params->{description} = "FMS-Update: " . $params->{description}; } 1; diff --git a/t/cobrand/isleofwight.t b/t/cobrand/isleofwight.t index 2f5b02337..f4797366c 100644 --- a/t/cobrand/isleofwight.t +++ b/t/cobrand/isleofwight.t @@ -83,6 +83,7 @@ subtest "fixing passes along the correct message" => sub { my $id = $o->post_service_request_update($c); is $id, 248, 'correct update ID returned'; my $cgi = CGI::Simple->new($o->test_req_used->content); + like $cgi->param('description'), qr/^FMS-Update:/, 'FMS update prefix included'; unlike $cgi->param('description'), qr/The customer indicated that this issue had been fixed/, 'No fixed message included'; $c = $mech->create_comment_for_problem($p, $p->user, 'Name', 'Update text', 'f', 'confirmed', 'fixed - user', { confirmed => \'current_timestamp' }); @@ -91,7 +92,7 @@ subtest "fixing passes along the correct message" => sub { $id = $o->post_service_request_update($c); is $id, 248, 'correct update ID returned'; $cgi = CGI::Simple->new($o->test_req_used->content); - like $cgi->param('description'), qr/^\[The customer indicated that this issue had been fixed/, 'Fixed message included'; + like $cgi->param('description'), qr/^FMS-Update: \[The customer indicated that this issue had been fixed/, 'Fixed message included'; }; }; |