aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller
diff options
context:
space:
mode:
Diffstat (limited to 't/app/controller')
-rw-r--r--t/app/controller/reports.t5
1 files changed, 4 insertions, 1 deletions
diff --git a/t/app/controller/reports.t b/t/app/controller/reports.t
index 15e7e3718..dd84d3d2e 100644
--- a/t/app/controller/reports.t
+++ b/t/app/controller/reports.t
@@ -2,6 +2,7 @@ use Test::MockTime qw(:all);
use FixMyStreet::TestMech;
use mySociety::MaPit;
use FixMyStreet::App;
+use FixMyStreet::Script::UpdateAllReports;
use DateTime;
set_absolute_time('2017-07-07T16:00:00');
@@ -11,6 +12,9 @@ END {
ok( my $mech = FixMyStreet::TestMech->new, 'Created mech object' );
+# Run the cron script with empty database
+FixMyStreet::Script::UpdateAllReports::generate_dashboard();
+
$mech->create_body_ok(2514, 'Birmingham City Council');
my $body_edin_id = $mech->create_body_ok(2651, 'City of Edinburgh Council')->id;
my $body_west_id = $mech->create_body_ok(2504, 'Westminster City Council')->id;
@@ -85,7 +89,6 @@ $fife_problems[10]->update( {
});
# Run the cron script that makes the data for /reports so we don't get an error.
-use FixMyStreet::Script::UpdateAllReports;
FixMyStreet::Script::UpdateAllReports::generate_dashboard();
# check that we can get the page