aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2015-09-01 10:07:30 +0100
committerMatthew Somerville <matthew@mysociety.org>2015-09-03 16:14:18 +0100
commit8544bafc365406ac9a403e80fe07cc361a7d1d5b (patch)
treeda90a4a20c9f3d653335b3c8369b900211b47dd0 /t
parent8ef9368785c1950ae0aea8c13584288d395662d6 (diff)
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.
Diffstat (limited to 't')
-rw-r--r--t/app/controller/rss.t7
1 files changed, 5 insertions, 2 deletions
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',