aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/auth_phone.t
diff options
context:
space:
mode:
Diffstat (limited to 't/app/controller/auth_phone.t')
-rw-r--r--t/app/controller/auth_phone.t3
1 files changed, 1 insertions, 2 deletions
diff --git a/t/app/controller/auth_phone.t b/t/app/controller/auth_phone.t
index a2f8f9cac..8673f5c62 100644
--- a/t/app/controller/auth_phone.t
+++ b/t/app/controller/auth_phone.t
@@ -56,8 +56,7 @@ subtest 'Log in using mobile, by text' => sub {
}, 'submit incorrect code');
$mech->content_contains('Try again');
- my $text = shift @{$twilio->texts};
- my ($code) = $text->{Body} =~ /(\d+)/;
+ my $code = $twilio->get_text_code;
$mech->submit_form_ok({
with_fields => { code => $code }
}, 'submit correct code');