diff options
Diffstat (limited to 't')
-rw-r--r-- | t/cobrand/isleofwight.t | 3 | ||||
-rw-r--r-- | t/cobrand/tfl.t | 22 |
2 files changed, 24 insertions, 1 deletions
diff --git a/t/cobrand/isleofwight.t b/t/cobrand/isleofwight.t index bd837b3c6..0c985e2fb 100644 --- a/t/cobrand/isleofwight.t +++ b/t/cobrand/isleofwight.t @@ -1,3 +1,4 @@ +use utf8; use CGI::Simple; use DateTime; use Test::MockModule; @@ -425,7 +426,7 @@ subtest "check not responsible as correct text" => sub { $mech->get_ok('/report/' . $p->id); }; - $mech->content_contains("not Island Roads' responsibility", "not reponsible message contains correct text"); + $mech->content_contains("not Island Roads’ responsibility", "not reponsible message contains correct text"); $p->comments->delete; $p->delete; }; diff --git a/t/cobrand/tfl.t b/t/cobrand/tfl.t index ef6ca087c..6b811beb4 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'; like $mech->get_text_body_from_email($email[0]), qr/https:\/\/street.tfl/, 'Correct link'; like $mech->get_text_body_from_email($email[1]), qr/$ref/, "Correct reference number in reporter email" if $ref; $mech->clear_emails_ok; @@ -818,6 +819,27 @@ FixMyStreet::override_config { }; FixMyStreet::override_config { + ALLOWED_COBRANDS => [ 'fixmystreet', 'tfl' ], + MAPIT_URL => 'http://mapit.uk/' +}, sub { + foreach (qw(tfl.fixmystreet.com fixmystreet.com)) { + $mech->host($_); + my ($p) = $mech->create_problems_for_body(1, $body->id, 'NotResp'); + my $c = FixMyStreet::DB->resultset('Comment')->create({ + problem => $p, user => $p->user, anonymous => 't', text => 'Update text', + problem_state => 'not responsible', state => 'confirmed', mark_fixed => 0, + confirmed => DateTime->now(), + }); + subtest "check not responsible as correct text on $_" => sub { + $mech->get_ok('/report/' . $p->id); + $mech->content_contains("not TfL’s responsibility", "not reponsible message contains correct text"); + }; + $p->comments->delete; + $p->delete; + } +}; + +FixMyStreet::override_config { ALLOWED_COBRANDS => 'bromley', MAPIT_URL => 'http://mapit.uk/' }, sub { |