diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-10-04 11:46:29 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-10-04 11:58:06 +0100 |
commit | 505aa9bcba1fe2f419e95cfa5122fab83b6f6ae0 (patch) | |
tree | 9a2118ee5dc352d7a037626a101f1697c40d5210 /perllib/FixMyStreet/TestMech.pm | |
parent | ead4a7ebbd33ac3e6e2c6bf3cb0302189eae99d1 (diff) | |
parent | d8fdbf5d353238d9e4c334f06de251987f7e60cf (diff) |
Merge branch 'issues/forcouncils/36-mobile-inspector-improvements'
Diffstat (limited to 'perllib/FixMyStreet/TestMech.pm')
-rw-r--r-- | perllib/FixMyStreet/TestMech.pm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/TestMech.pm b/perllib/FixMyStreet/TestMech.pm index 54c39ffb9..122a5d0c9 100644 --- a/perllib/FixMyStreet/TestMech.pm +++ b/perllib/FixMyStreet/TestMech.pm @@ -282,6 +282,16 @@ sub get_first_email { return $email_as_string; } +=head2 contains_or_lacks + +Based upon boolean FLAG, checks that content contains or lacks TEXT. + +=cut + +sub contains_or_lacks { + my ($mech, $flag, $text) = @_; + $flag ? $mech->content_contains($text) : $mech->content_lacks($text); +} =head2 page_errors |