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.pm11
1 files changed, 11 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/TestMech.pm b/perllib/FixMyStreet/TestMech.pm
index 30807c4e2..cc4e45f45 100644
--- a/perllib/FixMyStreet/TestMech.pm
+++ b/perllib/FixMyStreet/TestMech.pm
@@ -532,6 +532,17 @@ sub delete_problems_for_body {
}
}
+sub create_body_ok {
+ my $self = shift;
+ my ( $id, $name ) = @_;
+
+ my $params = { id => $id, area_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";
+ return $body;
+}
+
sub create_problems_for_body {
my ( $mech, $count, $body, $title, $params ) = @_;