diff options
Diffstat (limited to 't/app')
-rw-r--r-- | t/app/controller/report_display.t | 2 | ||||
-rw-r--r-- | t/app/controller/reports.t | 15 |
2 files changed, 14 insertions, 3 deletions
diff --git a/t/app/controller/report_display.t b/t/app/controller/report_display.t index 2fc4fde9f..a20eec005 100644 --- a/t/app/controller/report_display.t +++ b/t/app/controller/report_display.t @@ -151,7 +151,7 @@ subtest "test duration string" => sub { AREA_LINKS_FROM_PROBLEMS => 1, }, sub { $mech->get_ok("/report/$report_id"); - $mech->content_contains('Sent to <a href="http://localhost/reports/Westminster+City+Council">Westminster'); + $mech->content_contains('Sent to <a href="/reports/Westminster+City+Council">Westminster'); }; }; diff --git a/t/app/controller/reports.t b/t/app/controller/reports.t index 3c18b1383..66af2778d 100644 --- a/t/app/controller/reports.t +++ b/t/app/controller/reports.t @@ -95,8 +95,19 @@ $fife_problems[10]->update( { state => 'hidden', }); -# Run the cron script old-data (for the table no longer used by default) -FixMyStreet::Script::UpdateAllReports::generate(1); +FixMyStreet::override_config { + ALLOWED_COBRANDS => 'fixmystreet', +}, sub { + subtest 'Test the cron script old-data (for the table no longer used by default)' => sub { + FixMyStreet::Script::UpdateAllReports::generate(1); + + # Old style page no longer exists in core, but let's just check the code works okay + my $cobrand = FixMyStreet::Cobrand->get_class_for_moniker('fixmystreet')->new(); + FixMyStreet::DB->schema->cobrand($cobrand); + my @bodies = FixMyStreet::DB->resultset('Body')->active->translated->all_sorted; + is $bodies[0]->{url}->(), '/reports/Birmingham'; + }; +}; # Run the cron script that makes the data for /reports so we don't get an error. my $data = FixMyStreet::Script::UpdateAllReports::generate_dashboard(); |