diff options
Diffstat (limited to 't/cobrand')
-rw-r--r-- | t/cobrand/bucks.t | 4 | ||||
-rw-r--r-- | t/cobrand/fixmystreet.t | 5 | ||||
-rw-r--r-- | t/cobrand/restriction.t | 5 | ||||
-rw-r--r-- | t/cobrand/zurich.t | 2 | ||||
-rw-r--r-- | t/cobrand/zurich_attachments.txt | 2 |
5 files changed, 11 insertions, 7 deletions
diff --git a/t/cobrand/bucks.t b/t/cobrand/bucks.t index 965b90107..892bf617d 100644 --- a/t/cobrand/bucks.t +++ b/t/cobrand/bucks.t @@ -53,7 +53,7 @@ subtest 'flytipping on road sent to extra email' => sub { FixMyStreet::Script::Reports::send(); my @email = $mech->get_email; my $tfb = join('', 'illegaldumpingcosts', '@', 'buckscc.gov.uk'); - is $email[0]->header('To'), '"TfB" <' . $tfb . '>'; + is $email[0]->header('To'), 'TfB <' . $tfb . '>'; like $mech->get_text_body_from_email($email[1]), qr/report's reference number/; $report->discard_changes; is $report->external_id, 248, 'Report has right external ID'; @@ -84,7 +84,7 @@ subtest 'pothole on road not sent to extra email, only confirm sent' => sub { subtest 'flytipping off road sent to extra email' => sub { FixMyStreet::Script::Reports::send(); my @email = $mech->get_email; - is $email[0]->header('To'), '"Chiltern" <flytipping@chiltern>'; + is $email[0]->header('To'), 'Chiltern <flytipping@chiltern>'; like $mech->get_text_body_from_email($email[1]), qr/Please note that Buckinghamshire County Council is not responsible/; $report->discard_changes; is $report->external_id, undef, 'Report has right external ID'; diff --git a/t/cobrand/fixmystreet.t b/t/cobrand/fixmystreet.t index b47269db4..6095aee2a 100644 --- a/t/cobrand/fixmystreet.t +++ b/t/cobrand/fixmystreet.t @@ -1,3 +1,4 @@ +use utf8; use FixMyStreet::Script::UpdateAllReports; use FixMyStreet::TestMech; @@ -53,7 +54,7 @@ FixMyStreet::override_config { subtest 'check marketing dashboard csv' => sub { $mech->log_in_ok('someone@birmingham.gov.uk'); - $mech->create_problems_for_body(105, $body->id, 'Title', { + $mech->create_problems_for_body(105, $body->id, 'Titlē', { detail => "this report\nis split across\nseveral lines", areas => ",2514,", }); @@ -80,7 +81,7 @@ FixMyStreet::override_config { 'Column headers look correct'; my $body_id = $body->id; - like $rows[1]->[1], qr/Title Test \d+ for $body_id/, 'problem title correct'; + like $rows[1]->[1], qr/Titlē Test \d+ for $body_id/, 'problem title correct'; }; subtest 'check marketing dashboard contact listings' => sub { diff --git a/t/cobrand/restriction.t b/t/cobrand/restriction.t index 63fe326b1..185f365c8 100644 --- a/t/cobrand/restriction.t +++ b/t/cobrand/restriction.t @@ -19,7 +19,10 @@ package main; use FixMyStreet::TestMech; -my $c = FixMyStreet::App->new; +use Catalyst::Test 'FixMyStreet::App'; + +my ($res, $c) = ctx_request('/'); + my $cobrand = FixMyStreet::Cobrand::Tester->new({c => $c}); $c->stash->{cobrand} = $cobrand; diff --git a/t/cobrand/zurich.t b/t/cobrand/zurich.t index ee2724a07..0bfdd8351 100644 --- a/t/cobrand/zurich.t +++ b/t/cobrand/zurich.t @@ -1012,7 +1012,7 @@ subtest 'email images to external partners' => sub { $expected_email_content =~ s{Subject: (.*?)\r?\n}{ my $subj = Encode::decode('MIME-Header', $1); $subj =~ s{REPORT_ID}{$REPORT_ID}g; - 'Subject: ' . Email::MIME::Encode::mime_encode($subj, "utf-8") . "\n"; + 'Subject: ' . Email::MIME::Encode::mime_encode($subj, "utf-8", 9) . "\n"; }eg; $expected_email_content =~ s{REPORT_ID}{$REPORT_ID}g; $expected_email_content =~ s{BOUNDARY}{$boundary}g; diff --git a/t/cobrand/zurich_attachments.txt b/t/cobrand/zurich_attachments.txt index 25a1bacf0..26b7eb8ca 100644 --- a/t/cobrand/zurich_attachments.txt +++ b/t/cobrand/zurich_attachments.txt @@ -3,7 +3,7 @@ Subject: =?iso-8859-1?Q?Z=FCri?= wie neu: Weitergeleitete Meldung #REPORT_ID Content-Type: multipart/mixed; boundary="BOUNDARY"
To: "External Body" <external_body@example.net>
Content-Transfer-Encoding: 7bit
-From: "FixMyStreet" <division@example.org>
+From: FixMyStreet <division@example.org>
--BOUNDARY
|