aboutsummaryrefslogtreecommitdiffstats
path: root/t/script/inactive.t
diff options
context:
space:
mode:
Diffstat (limited to 't/script/inactive.t')
-rw-r--r--t/script/inactive.t4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/script/inactive.t b/t/script/inactive.t
index 4667c989b..489ff55ca 100644
--- a/t/script/inactive.t
+++ b/t/script/inactive.t
@@ -5,12 +5,12 @@ use_ok 'FixMyStreet::Script::Inactive';
my $in = FixMyStreet::Script::Inactive->new( anonymize => 6, email => 3 );
my $mech = FixMyStreet::TestMech->new;
-my $user = FixMyStreet::DB->resultset("User")->find_or_create({ email => 'test@example.com' });
+my $user = $mech->create_user_ok('test@example.com');
my $t = DateTime->new(year => 2016, month => 1, day => 1, hour => 12);
$user->last_active($t);
$user->update;
-my $user_inactive = FixMyStreet::DB->resultset("User")->find_or_create({ email => 'inactive@example.com' });
+my $user_inactive = $mech->create_user_ok('inactive@example.com');
$t = DateTime->now->subtract(months => 4);
$user_inactive->last_active($t);
$user_inactive->update;