diff options
author | Matthew Somerville <matthew@mysociety.org> | 2014-12-11 16:42:53 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2014-12-12 12:41:31 +0000 |
commit | 43c98742ee85c73c4783451ceeea28108bb793c6 (patch) | |
tree | 40ced5bfa4a7b6c0328da62f8332cdc06a6637ea /t/app/controller/alert_new.t | |
parent | 4edc79829ebf2f6dcce11185e929a2a592a3f5ed (diff) |
By default, use area-based alerts.
The body-based alert only works if the body ID matches the MapIt ID.
This fixes #959. Further work needs to be done to enable proper
body-based alerts that work properly in all circumstances.
Consequently, factor out fixed body IDs from many tests.
Also fix a couple of tests not overriding geocoder correctly.
Diffstat (limited to 't/app/controller/alert_new.t')
-rw-r--r-- | t/app/controller/alert_new.t | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/t/app/controller/alert_new.t b/t/app/controller/alert_new.t index 14cf32d7c..115bb181a 100644 --- a/t/app/controller/alert_new.t +++ b/t/app/controller/alert_new.t @@ -349,7 +349,7 @@ subtest "Test normal alert signups and that alerts are sent" => sub { }, { fields => { - feed => 'council:2651:City_of_Edinburgh', + feed => 'area:2651:City_of_Edinburgh', } }, ) { @@ -383,7 +383,7 @@ subtest "Test normal alert signups and that alerts are sent" => sub { my $report_time = '2011-03-01 12:00:00'; my $report = FixMyStreet::App->model('DB::Problem')->find_or_create( { postcode => 'EH1 1BB', - bodies_str => '2651', + bodies_str => '1', areas => ',11808,135007,14419,134935,2651,20728,', category => 'Street lighting', title => 'Testing', @@ -451,7 +451,7 @@ subtest "Test normal alert signups and that alerts are sent" => sub { my $count; for (@emails) { $count++ if $_->body =~ /The following updates have been left on this report:/; - $count++ if $_->body =~ /The following new FixMyStreet reports have been sent to City of\s+Edinburgh\s+Council:/; + $count++ if $_->body =~ /The following new FixMyStreet reports have been added in City of\s+Edinburgh\s+Council:/; $count++ if $_->body =~ /The following FixMyStreet reports have been made within the area you\s+specified:/; $count++ if $_->body =~ /\s+-\s+Testing/; } |