aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/auth_profile.t
diff options
context:
space:
mode:
Diffstat (limited to 't/app/controller/auth_profile.t')
-rw-r--r--t/app/controller/auth_profile.t10
1 files changed, 6 insertions, 4 deletions
diff --git a/t/app/controller/auth_profile.t b/t/app/controller/auth_profile.t
index 815098caa..2f0ef6a11 100644
--- a/t/app/controller/auth_profile.t
+++ b/t/app/controller/auth_profile.t
@@ -1,6 +1,10 @@
+use Test::MockModule;
use FixMyStreet::TestMech;
my $mech = FixMyStreet::TestMech->new;
+my $resolver = Test::MockModule->new('Email::Valid');
+$resolver->mock('address', sub { $_[1] });
+
use t::Mock::Twilio;
my $twilio = t::Mock::Twilio->new;
@@ -10,10 +14,6 @@ my $test_email = 'test@example.com';
my $test_email2 = 'test@example.net';
my $test_password = 'foobar123';
-END {
- done_testing();
-}
-
# get a sign in email and change password
subtest "Test change password page" => sub {
$mech->clear_emails_ok;
@@ -449,3 +449,5 @@ subtest "Test two-factor authentication admin" => sub {
$mech->submit_form_ok({ button => 'toggle_2fa' }, "submit 2FA deactivation");
$mech->content_contains('has been deactivated', "2FA deactivated");
};
+
+done_testing();