aboutsummaryrefslogtreecommitdiffstats
path: root/t/cobrand/zurich.t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2016-09-29 15:06:07 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-09-29 16:34:43 +0100
commit179845c83b1a17f56c779e8f0e89317c57fa84b8 (patch)
tree67ac240b1ec678147be6354ecbe1b02e0d4b7d62 /t/cobrand/zurich.t
parent78b34d4543c1c3808851351a9f083789a99c72c9 (diff)
Factor out contains_or_lacks test function.
Diffstat (limited to 't/cobrand/zurich.t')
-rw-r--r--t/cobrand/zurich.t15
1 files changed, 2 insertions, 13 deletions
diff --git a/t/cobrand/zurich.t b/t/cobrand/zurich.t
index 53d8dba0f..330cb3389 100644
--- a/t/cobrand/zurich.t
+++ b/t/cobrand/zurich.t
@@ -936,8 +936,8 @@ subtest 'Status update shown as appropriate' => sub {
my ($state, $update, $public, $user_response) = @$_;
$report->update({ state => $state });
$mech->get_ok( '/admin/report_edit/' . $report->id );
- contains_or_lacks($mech, $update, "<textarea name='status_update'");
- contains_or_lacks($mech, $public || $user_response, '<div class="admin-official-answer">');
+ $mech->contains_or_lacks($update, "<textarea name='status_update'");
+ $mech->contains_or_lacks($public || $user_response, '<div class="admin-official-answer">');
if ($public) {
$mech->get_ok( '/report/' . $report->id );
@@ -947,17 +947,6 @@ subtest 'Status update shown as appropriate' => sub {
};
};
-# TODO refactor into FixMyStreet::TestMech;
-sub contains_or_lacks {
- my ($mech, $contains, $text) = @_;
- if ($contains) {
- $mech->content_contains($text);
- }
- else {
- $mech->content_lacks($text);
- }
-}
-
subtest 'time_spent' => sub {
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ 'zurich' ],