diff options
Diffstat (limited to 't/cobrand/tfl.t')
-rw-r--r-- | t/cobrand/tfl.t | 22 |
1 files changed, 22 insertions, 0 deletions
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 { |