diff options
-rw-r--r-- | perllib/FixMyStreet/Cobrand/TfL.pm | 2 | ||||
-rw-r--r-- | t/cobrand/tfl.t | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/TfL.pm b/perllib/FixMyStreet/Cobrand/TfL.pm index d1ae347fc..61ac7a8b2 100644 --- a/perllib/FixMyStreet/Cobrand/TfL.pm +++ b/perllib/FixMyStreet/Cobrand/TfL.pm @@ -25,6 +25,8 @@ sub send_questionnaires { 0 } sub category_change_force_resend { 1 } +sub do_not_reply_email { shift->feature('do_not_reply_email') } + sub area_check { my ( $self, $params, $context ) = @_; diff --git a/t/cobrand/tfl.t b/t/cobrand/tfl.t index c65239a78..86ab5a6f3 100644 --- a/t/cobrand/tfl.t +++ b/t/cobrand/tfl.t @@ -172,6 +172,12 @@ FixMyStreet::override_config { anonymous_account => { tfl => 'anonymous' }, + contact_name => { + tfl => 'TfL Street Care', + }, + do_not_reply_email => { + tfl => 'fms-tfl-DO-NOT-REPLY@example.com', + }, }, }, sub { @@ -312,6 +318,7 @@ subtest "extra information included in email" => sub { like $mech->get_text_body_from_email($email[0]), qr/Report reference: FMS$id/, "FMS-prefixed ID in TfL email"; like $mech->get_text_body_from_email($email[0]), qr/Stop number: 12345678/, "Bus stop code in TfL email"; is $email[1]->header('To'), $report->user->email; + is $email[1]->header('From'), '"TfL Street Care" <fms-tfl-DO-NOT-REPLY@example.com>'; like $mech->get_text_body_from_email($email[1]), qr/report's reference number is FMS$id/, "FMS-prefixed ID in reporter email"; $mech->clear_emails_ok; @@ -638,6 +645,9 @@ FixMyStreet::override_config { anonymous_account => { tfl => 'anonymous' }, + do_not_reply_email => { + tfl => 'fms-tfl-DO-NOT-REPLY@example.com', + }, }, }, sub { |