diff options
author | Matthew Somerville <matthew@mysociety.org> | 2020-03-18 14:15:51 +0000 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2020-03-31 09:58:58 +0100 |
commit | 4e6b347c276d772fa31290955355d5fb8e974300 (patch) | |
tree | aac50e9fbc212b1995685624b05b1c0d91d66da0 /t/app | |
parent | ac6eb28d588eeac702f9f1a6806c6939b1d67fb3 (diff) |
[Highways England] Update report sending handling.
Use normal contact email, with special override in Area 7.
Diffstat (limited to 't/app')
-rw-r--r-- | t/app/sendreport/email/highways.t | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/app/sendreport/email/highways.t b/t/app/sendreport/email/highways.t index 452dda822..b9a71f23f 100644 --- a/t/app/sendreport/email/highways.t +++ b/t/app/sendreport/email/highways.t @@ -29,5 +29,17 @@ $e->add_body($highways); is $e->build_recipient_list($row), 1, 'correct recipient list count'; is_deeply $e->to, [ [ 'highways@example.com', 'Highways England' ] ], 'correct To line'; +$row->set_extra_fields( { name => 'area_name', value => 'Area 6' } ); +is $e->build_recipient_list($row), 1, 'correct recipient list count'; +is_deeply $e->to, [ [ 'highways@example.com', 'Highways England' ] ], 'correct To line'; + +FixMyStreet::override_config { + COBRAND_FEATURES => { open311_email => { highwaysengland => { area_seven => 'a7@example.com' } } } +}, sub { + $row->set_extra_fields( { name => 'area_name', value => 'Area 7' } ); + is $e->build_recipient_list($row), 1, 'correct recipient list count'; + is_deeply $e->to, [ [ 'a7@example.com', 'Highways England' ] ], 'correct To line'; +}; + done_testing(); |