diff options
author | Dave Arter <davea@mysociety.org> | 2016-07-14 11:27:12 +0100 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2016-07-19 18:10:04 +0100 |
commit | def23b4c2ed67e3920489d07cf04689117274fc8 (patch) | |
tree | 3169b8634ea21351eb65e8f2e9c3040e282d618f /t/app/controller/token.t | |
parent | a001715332d9423dd4c68542f7eceac4c2e3900c (diff) |
Use improved TestMech::create_user_ok instead of User::find_or_create
This improves create_user_ok to work more like create_body_ok where extra params
can be passed in and set on the model.
Diffstat (limited to 't/app/controller/token.t')
-rw-r--r-- | t/app/controller/token.t | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/t/app/controller/token.t b/t/app/controller/token.t index 9ca8b905d..ac88f4f7a 100644 --- a/t/app/controller/token.t +++ b/t/app/controller/token.t @@ -6,10 +6,8 @@ use utf8; use FixMyStreet::TestMech; use FixMyStreet::App; -my $user = FixMyStreet::App->model('DB::User')->find_or_create({ - name => 'Bob', email => 'bob@example.com', - }); my $mech = FixMyStreet::TestMech->new; +my $user = $mech->create_user_ok('bob@example.com', name => 'Bob'); subtest 'Zurich special case for C::Tokens->problem_confirm' => sub { FixMyStreet::override_config { |