aboutsummaryrefslogtreecommitdiffstats
path: root/t/app
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2020-03-18 14:15:51 +0000
committerStruan Donald <struan@exo.org.uk>2020-03-31 09:58:58 +0100
commit4e6b347c276d772fa31290955355d5fb8e974300 (patch)
treeaac50e9fbc212b1995685624b05b1c0d91d66da0 /t/app
parentac6eb28d588eeac702f9f1a6806c6939b1d67fb3 (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.t12
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();