aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/index.t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2014-12-11 16:42:53 +0000
committerMatthew Somerville <matthew@mysociety.org>2014-12-12 12:41:31 +0000
commit43c98742ee85c73c4783451ceeea28108bb793c6 (patch)
tree40ced5bfa4a7b6c0328da62f8332cdc06a6637ea /t/app/controller/index.t
parent4edc79829ebf2f6dcce11185e929a2a592a3f5ed (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/index.t')
-rw-r--r--t/app/controller/index.t7
1 files changed, 4 insertions, 3 deletions
diff --git a/t/app/controller/index.t b/t/app/controller/index.t
index 308dd2c32..346ccb2e1 100644
--- a/t/app/controller/index.t
+++ b/t/app/controller/index.t
@@ -63,8 +63,6 @@ subtest "does pc, (x,y), (e,n) or (lat,lon) go to /around" => sub {
}
};
-$mech->delete_problems_for_body( 2651 );
-
my $problem_rs = FixMyStreet::App->model('DB::Problem');
my $num = $problem_rs->count;
@@ -82,4 +80,7 @@ ok $mech->get('/report/' . $edinburgh_problems[2]->id);
is $mech->res->code, 403, 'page forbidden';
is $problem_rs->count, $num+5;
-done_testing();
+END {
+ $mech->delete_problems_for_body( 2651 );
+ done_testing();
+}