aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/admin.t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2020-04-24 18:58:03 +0100
committerMatthew Somerville <matthew@mysociety.org>2020-04-24 20:18:08 +0100
commit24124fdc2d41333c9d9006c6fc990816405b3671 (patch)
tree9413b75e7c8a15c2e70c5e11076b8f2b63434829 /t/app/controller/admin.t
parentf77037ecdc9e248f91de980d1b2ac94a220f49e9 (diff)
Move stats from main admin index to stats index.
These stats can take a while to generate, and we don't want to slow down people mostly coming to the admin index to do something else.
Diffstat (limited to 't/app/controller/admin.t')
-rw-r--r--t/app/controller/admin.t10
1 files changed, 5 insertions, 5 deletions
diff --git a/t/app/controller/admin.t b/t/app/controller/admin.t
index b170633fc..5607f2dc3 100644
--- a/t/app/controller/admin.t
+++ b/t/app/controller/admin.t
@@ -84,10 +84,10 @@ subtest 'check summary counts' => sub {
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ 'fixmystreet' ],
}, sub {
- $mech->get_ok('/admin');
+ $mech->get_ok('/admin/stats');
};
- $mech->title_like(qr/Summary/);
+ $mech->title_like(qr/Stats/);
$mech->content_contains( "$problem_count</strong> live problems" );
$mech->content_contains( "$a_count confirmed alerts" );
@@ -102,8 +102,8 @@ subtest 'check summary counts' => sub {
}, sub {
ok $mech->host('oxfordshire.fixmystreet.com');
- $mech->get_ok('/admin');
- $mech->title_like(qr/Summary/);
+ $mech->get_ok('/admin/stats');
+ $mech->title_like(qr/Stats/);
my ($num_live) = $mech->content =~ /(\d+)<\/strong> live problems/;
my ($num_alerts) = $mech->content =~ /(\d+) confirmed alerts/;
@@ -116,7 +116,7 @@ subtest 'check summary counts' => sub {
$alert->cobrand('oxfordshire');
$alert->update;
- $mech->get_ok('/admin');
+ $mech->get_ok('/admin/stats');
$mech->content_contains( ($num_live+1) . "</strong> live problems" );
$mech->content_contains( ($num_alerts+1) . " confirmed alerts" );