diff options
author | Matthew Somerville <matthew@mysociety.org> | 2011-07-18 18:30:10 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-07-18 18:30:10 +0100 |
commit | c798298d9320810b602b34e3e8c86d32dca01769 (patch) | |
tree | 575d93e6d4afb981d88e20e90ede215b749a3459 /t/app/controller/admin.t | |
parent | 461ee5a78107fb2d3631108ea2d3b1efc694faf4 (diff) |
Fix test for if site currently has a Barnet report in it.
Diffstat (limited to 't/app/controller/admin.t')
-rw-r--r-- | t/app/controller/admin.t | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/t/app/controller/admin.t b/t/app/controller/admin.t index ba5095cea..7f8590747 100644 --- a/t/app/controller/admin.t +++ b/t/app/controller/admin.t @@ -106,9 +106,9 @@ subtest 'check summary counts' => sub { $mech->get_ok('/admin'); $mech->title_like(qr/Summary/); - $mech->content_contains( "0</strong> live problems" ); - $mech->content_contains( "0 confirmed alerts" ); - $mech->content_contains( "0 questionnaires sent" ); + my ($num_live) = $mech->content =~ /(\d+)<\/strong> live problems/; + my ($num_alerts) = $mech->content =~ /(\d+) confirmed alerts/; + my ($num_qs) = $mech->content =~ /(\d+) questionnaires sent/; $report->council(2489); $report->cobrand('barnet'); @@ -119,9 +119,9 @@ subtest 'check summary counts' => sub { $mech->get_ok('/admin'); - $mech->content_contains( "1</strong> live problems" ); - $mech->content_contains( "1 confirmed alerts" ); - $mech->content_contains( "1 questionnaires sent" ); + $mech->content_contains( ($num_live+1) . "</strong> live problems" ); + $mech->content_contains( ($num_alerts+1) . " confirmed alerts" ); + $mech->content_contains( ($num_qs+1) . " questionnaires sent" ); $report->council(2504); $report->cobrand(''); |