diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-02-19 10:53:58 +0000 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-02-19 10:53:58 +0000 |
commit | ef28987bc739f3c6cf3119574cf311cfae069b2e (patch) | |
tree | b187c43bfd33fc603631998635a331a640af12df /perllib/FixMyStreet/TestMech.pm | |
parent | 19d4efadccd980750e6dcb81e163489bc3d62b85 (diff) | |
parent | 684405c7808cc71567f52cbba6d595326438b876 (diff) |
Merge branch '1939-questionnaire-links'
Diffstat (limited to 'perllib/FixMyStreet/TestMech.pm')
-rw-r--r-- | perllib/FixMyStreet/TestMech.pm | 4 |
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'"; |