From 8544bafc365406ac9a403e80fe07cc361a7d1d5b Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Tue, 1 Sep 2015 10:07:30 +0100 Subject: Use base URL in cobrand alert for no-body report. If a cobrand has a body restriction, then a report without any body won't be shown on it, so we need to make sure links to the report (in email alerts and RSS) are to the base URL, not the cobrand. --- t/app/controller/rss.t | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 't/app/controller/rss.t') diff --git a/t/app/controller/rss.t b/t/app/controller/rss.t index ae1c0d193..db653c094 100644 --- a/t/app/controller/rss.t +++ b/t/app/controller/rss.t @@ -127,11 +127,14 @@ $mech->content_contains( '18 North Bridge, Edinburgh' ); $report->delete(); +my $council = $mech->create_body_ok(2333, 'Hart Council'); +my $county = $mech->create_body_ok(2227, 'Hampshire Council'); + my $now = DateTime->now(); my $report_to_council = FixMyStreet::App->model('DB::Problem')->find_or_create( { postcode => 'GU51 4AE', - bodies_str => '2333', + bodies_str => $council->id, areas => ',2333,2227,', category => 'Other', title => 'council report', @@ -155,7 +158,7 @@ my $report_to_council = FixMyStreet::App->model('DB::Problem')->find_or_create( my $report_to_county_council = FixMyStreet::App->model('DB::Problem')->find_or_create( { postcode => 'GU51 4AE', - bodies_str => '2227', + bodies_str => $county->id, areas => ',2333,2227,', category => 'Other', title => 'county report', -- cgit v1.2.3