aboutsummaryrefslogtreecommitdiffstats
path: root/t/cobrand
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2019-05-03 19:43:00 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2019-05-13 11:53:24 +0100
commit0796a2b6821e75e22ec6eacd3950ef916b16303d (patch)
treeb37dfe49b5cfbd1be9528bc8ed9fa5667b1be7d0 /t/cobrand
parentc65c2bc48abce71bca97079ffdb7aa39d5b7e8ed (diff)
Update a number of packages.
Update: * Catalyst * Specify Catalyst::DispatchType::Regex explicitly * Remove Catalyst::Plugin::Unicode::Encoding * Catalyst::Plugin::SmartURI * Specify URI::SmartURI explicitly * Catalyst::Plugin::Static::Simple * CGI * Class::Load * DateTime * DateTime::TimeZone * DBD::Pg * DBIx::Class * DBIx::Class::EncodedColumn. * Email::Address. * Email::MIME * ExtUtils::MakeMaker * ExtUtils::ParseXS (for Params::Classify upgrade) * File::ChangeNotify * Image::Size * IO::Socket::SSL * local::lib * Moo * Moose (and some related others due to deprecations) * namespace::autoclean * Net::Server * Net::SSLeay * Number::Phone * Plack * Starman * Template * Test::PostgreSQL * Test::WWW::Mechanize::Catalyst * Text::CSV * YAML carton install was run on a wheezy box, the oldest that is supported, to make sure the required minimal vesions of core modules weren't removed from the snapshot. Cpanel::JSON::XS, Devel::GlobalDestruction::XS, and MooseX::NonMoose were then put back in the snapshot, in case another system needs them (e.g. system Perl on Mac looks for MooseX::NonMoose).
Diffstat (limited to 't/cobrand')
-rw-r--r--t/cobrand/bucks.t4
-rw-r--r--t/cobrand/fixmystreet.t5
-rw-r--r--t/cobrand/restriction.t5
-rw-r--r--t/cobrand/zurich.t2
-rw-r--r--t/cobrand/zurich_attachments.txt2
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