aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/contact.t
diff options
context:
space:
mode:
Diffstat (limited to 't/app/controller/contact.t')
-rw-r--r--t/app/controller/contact.t15
1 files changed, 3 insertions, 12 deletions
diff --git a/t/app/controller/contact.t b/t/app/controller/contact.t
index 4ac69a9f8..1b0f09a85 100644
--- a/t/app/controller/contact.t
+++ b/t/app/controller/contact.t
@@ -52,12 +52,7 @@ for my $test (
)
{
subtest 'check reporting a problem displays correctly' => sub {
- my $user = FixMyStreet::App->model('DB::User')->find_or_create(
- {
- name => $test->{name},
- email => $test->{email}
- }
- );
+ my $user = $mech->create_user_ok($test->{email}, name => $test->{name});
my $problem = FixMyStreet::App->model('DB::Problem')->create(
{
@@ -80,12 +75,8 @@ for my $test (
if ( $test->{update} ) {
my $update_info = $test->{update};
- my $update_user = FixMyStreet::App->model('DB::User')->find_or_create(
- {
- name => $update_info->{name},
- email => $update_info->{email}
- }
- );
+ my $update_user = $mech->create_user_ok($update_info->{email},
+ name => $update_info->{name});
$update = FixMyStreet::App->model('DB::Comment')->create(
{