aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/model/problem.t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2019-11-08 14:13:57 +0000
committerMatthew Somerville <matthew@mysociety.org>2019-11-10 13:23:14 +0000
commitdb61249c59a96a2fad80523288b7d13881c10965 (patch)
tree2f8c70df64a7c5227264230c2b4de1938b58b1ac /t/app/model/problem.t
parent561002d12a43ad5e222382e09ec9a277ce7b6ae8 (diff)
Store email addresses report sent to on the report
Diffstat (limited to 't/app/model/problem.t')
-rw-r--r--t/app/model/problem.t3
1 files changed, 3 insertions, 0 deletions
diff --git a/t/app/model/problem.t b/t/app/model/problem.t
index e973febc1..18557f44a 100644
--- a/t/app/model/problem.t
+++ b/t/app/model/problem.t
@@ -616,6 +616,8 @@ subtest 'check can set multiple emails as a single contact' => sub {
FixMyStreet::Script::Reports::send();
};
+ $problem->discard_changes;
+ is_deeply $problem->get_extra_metadata('sent_to'), [ '2636@example.com', '2636-2@example.com' ];
$mech->email_count_is(1);
my $email = $mech->get_email;
is $email->header('To'), '"City of Edinburgh Council" <2636@example.com>, "City of Edinburgh Council" <2636-2@example.com>', 'To contains two email addresses';
@@ -662,6 +664,7 @@ subtest 'check can turn on report sent email alerts' => sub {
$problem->discard_changes;
ok defined( $problem->whensent ), 'whensent set';
+ is_deeply $problem->get_extra_metadata('sent_to'), [ 'test@example.org' ];
$email = $emails[1];
like $email->header('Subject'), qr/FixMyStreet Report Sent/, 'report sent email title correct';