aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/admin.t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-12-14 19:07:08 +0000
committerMatthew Somerville <matthew@mysociety.org>2012-12-19 14:43:26 +0000
commitddf9dbdbf6486c781ca4a5822614b0b7cee2c062 (patch)
tree09c12affc3390138b03292d3f90810287b4941d0 /t/app/controller/admin.t
parentda29e8a75eaa92e98807ad89d29d3d1f3c01bc14 (diff)
Allow bodies to span multiple area IDs, and areas can be covered by more than one body.
Diffstat (limited to 't/app/controller/admin.t')
-rw-r--r--t/app/controller/admin.t4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/app/controller/admin.t b/t/app/controller/admin.t
index d759c1238..d8b721ca9 100644
--- a/t/app/controller/admin.t
+++ b/t/app/controller/admin.t
@@ -259,7 +259,7 @@ subtest 'check open311 configuring' => sub {
$mech->content_contains('Configuration updated - contacts will be generated automatically later');
my $open311 =
- FixMyStreet::App->model('DB::Body')->search( { area_id => 2650 } );
+ FixMyStreet::App->model('DB::Body')->search( { 'body_areas.area_id' => 2650 }, { join => 'body_areas' } );
is $open311->count, 1, 'only one configuration';
my $conf = $open311->first;
@@ -283,7 +283,7 @@ subtest 'check open311 configuring' => sub {
$mech->content_contains('Configuration updated');
$open311 =
- FixMyStreet::App->model('DB::Body')->search( { area_id => 2650 } );
+ FixMyStreet::App->model('DB::Body')->search( { 'body_areas.area_id' => 2650 }, { join => 'body_areas' } );
is $open311->count, 1, 'only one configuration';
$conf = $open311->first;