aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/TestMech.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-02-13 16:13:38 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-02-16 18:02:19 +0000
commit24bd9e82e5470be7269e06def8452015608bd00a (patch)
treea1c2680e849ea6cfbef86fa456743bdcd2c438bb /perllib/FixMyStreet/TestMech.pm
parentce311876233b03631358f397619f87534946aa39 (diff)
Prefill first question from questionnaire email.
Diffstat (limited to 'perllib/FixMyStreet/TestMech.pm')
-rw-r--r--perllib/FixMyStreet/TestMech.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/TestMech.pm b/perllib/FixMyStreet/TestMech.pm
index ac2ac023d..c5b72a7cf 100644
--- a/perllib/FixMyStreet/TestMech.pm
+++ b/perllib/FixMyStreet/TestMech.pm
@@ -247,7 +247,7 @@ sub get_text_body_from_email {
}
sub get_link_from_email {
- my ($mech, $email, $multiple) = @_;
+ my ($mech, $email, $multiple, $mismatch) = @_;
unless ($email) {
$email = $mech->get_email;
$mech->clear_emails_ok;
@@ -261,7 +261,7 @@ sub get_link_from_email {
if (@links) {
# Must be an HTML part now, first two links are in header
my @html_links = $part->body =~ m{https?://[^"]+}g;
- is $links[0], $html_links[2], 'HTML link matches text link';
+ is $links[0], $html_links[2], 'HTML link matches text link' unless $mismatch;
} else {
@links = $part->body =~ m{https?://\S+}g;
ok @links, "Found links in email '@links'";