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/zurich.t | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 't/cobrand/zurich.t') diff --git a/t/cobrand/zurich.t b/t/cobrand/zurich.t index 8dbc43464..203bbc0f8 100644 --- a/t/cobrand/zurich.t +++ b/t/cobrand/zurich.t @@ -137,16 +137,11 @@ $mech->content_contains( 'Erfasst' ); subtest "changing of categories" => sub { # create a few categories (which are actually contacts) foreach my $name ( qw/Cat1 Cat2/ ) { - FixMyStreet::App->model('DB::Contact')->find_or_create({ + $mech->create_contact_ok( body => $division, category => $name, email => "$name\@example.org", - confirmed => 1, - deleted => 0, - editor => "editor", - whenedited => DateTime->now(), - note => "note for $name", - }); + ); } # put report into known category -- cgit v1.2.3