diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-07-18 17:20:04 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-07-18 17:21:45 +0100 |
commit | 60adb1e8635996a1b4ef96bcf3ef99ca01505b46 (patch) | |
tree | 35280a7863bf615887f92465278fe96d8a0789e7 /t/app/controller/reports.t | |
parent | 755f0c7ee75fe3092671e9d1f7f46603ccc3bfc5 (diff) |
Fix update-all-reports when database empty.
Diffstat (limited to 't/app/controller/reports.t')
-rw-r--r-- | t/app/controller/reports.t | 5 |
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 |