diff options
author | Matthew Somerville <matthew@mysociety.org> | 2012-12-13 18:53:25 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2012-12-15 00:11:06 +0000 |
commit | f05dc118efd45e0df7f3e8d04366f732440f4fd6 (patch) | |
tree | ecac77e56cb7c9d5b9c59ae7bfd6392123d9b279 /perllib/FixMyStreet/TestMech.pm | |
parent | 9fb130a0ab1bd36e977439b7697fba5fec5b1f00 (diff) |
Update tests for new names of things and bodies needing to exist.
Diffstat (limited to 'perllib/FixMyStreet/TestMech.pm')
-rw-r--r-- | perllib/FixMyStreet/TestMech.pm | 11 |
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 ) = @_; |