From 76e533bd318cb4208faa1bf5cd0c00bde9e08e6c Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Fri, 13 Mar 2015 18:04:55 +0000 Subject: Factor out test contact creation to function. --- t/cobrand/fixamingata.t | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 't/cobrand/fixamingata.t') diff --git a/t/cobrand/fixamingata.t b/t/cobrand/fixamingata.t index 714d475e1..3c818474d 100644 --- a/t/cobrand/fixamingata.t +++ b/t/cobrand/fixamingata.t @@ -25,16 +25,11 @@ FixMyStreet::override_config { $mech->content_like( qr/FixaMinGata/ ); my $body = $mech->create_body_ok( 1, 'Body' ); -FixMyStreet::App->model('DB::Contact')->find_or_create({ +$mech->create_contact_ok( body => $body, category => "Other", email => "other\@example.org", - confirmed => 1, - deleted => 0, - editor => "Editor", - whenedited => \'now()', - note => 'Note', -}); +); my @reports = $mech->create_problems_for_body( 1, $body->id, 'Test', { cobrand => 'fixamingata', -- cgit v1.2.3