diff options
author | Matthew Somerville <matthew@mysociety.org> | 2019-12-10 17:10:37 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2019-12-10 17:10:39 +0000 |
commit | 76938393009b65b5f436a43b9dfa2f415b74f448 (patch) | |
tree | 47894b75043d79fe28be99f0986aa6299286397f | |
parent | 6ea3d7f26b8b54ed52e0a90f1e4d7976081c4e3f (diff) |
[UK] Fix email logo display on submit email.
If e.g. a report was made on .com and sent to TfL, it would
be sent with TfL colours but a (stretched) .com logo.
-rw-r--r-- | perllib/FixMyStreet/SendReport/Email.pm | 5 | ||||
-rw-r--r-- | t/cobrand/tfl.t | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/SendReport/Email.pm b/perllib/FixMyStreet/SendReport/Email.pm index 80b60b381..ffff43472 100644 --- a/perllib/FixMyStreet/SendReport/Email.pm +++ b/perllib/FixMyStreet/SendReport/Email.pm @@ -106,7 +106,10 @@ sub send { } my $result = FixMyStreet::Email::send_cron($row->result_source->schema, - $self->get_template($row), $h, + $self->get_template($row), { + %$h, + cobrand => $cobrand, # For correct logo that uses cobrand object + }, $params, $sender, $nomail, $cobrand, $row->lang); unless ($result) { diff --git a/t/cobrand/tfl.t b/t/cobrand/tfl.t index 287a8c98e..4c9ed8ba4 100644 --- a/t/cobrand/tfl.t +++ b/t/cobrand/tfl.t @@ -422,6 +422,7 @@ for my $test ( FixMyStreet::Script::Reports::send(); my @email = $mech->get_email; is $email[0]->header('To'), $to, 'Sent to correct address'; + like $email[0]->as_string, qr/iEYI87gX6Upb\+tKYzrSmN83pTnv606AOtahHTepSm/, 'Right logo'; $mech->clear_emails_ok; FixMyStreet::DB->resultset("Problem")->find({ title => 'Test Report for borough team'})->delete; }; |