aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/TestMech.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/TestMech.pm')
-rw-r--r--perllib/FixMyStreet/TestMech.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/TestMech.pm b/perllib/FixMyStreet/TestMech.pm
index cc4e45f45..addbb1752 100644
--- a/perllib/FixMyStreet/TestMech.pm
+++ b/perllib/FixMyStreet/TestMech.pm
@@ -536,11 +536,18 @@ sub create_body_ok {
my $self = shift;
my ( $id, $name ) = @_;
- my $params = { id => $id, area_id => $id, name => $name };
+ my $params = { id => $id, name => $name };
my $body = FixMyStreet::App->model('DB::Body')->find_or_create($params);
$body->update($params); # Make sure
ok $body, "found/created user for $id $name";
+
+ FixMyStreet::App->model('DB::BodyArea')->find_or_create({
+ area_id => $id,
+ body_id => $id,
+ });
+
return $body;
+
}
sub create_problems_for_body {