aboutsummaryrefslogtreecommitdiffstats
path: root/t/app
diff options
context:
space:
mode:
Diffstat (limited to 't/app')
-rw-r--r--t/app/controller/auth.t8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/app/controller/auth.t b/t/app/controller/auth.t
index 251aa2977..22ade6f4b 100644
--- a/t/app/controller/auth.t
+++ b/t/app/controller/auth.t
@@ -2,6 +2,7 @@ use strict;
use warnings;
use Test::More;
+use Test::MockModule;
use FixMyStreet::TestMech;
my $mech = FixMyStreet::TestMech->new;
@@ -33,6 +34,13 @@ for my $test (
)
{
my ( $email, $error_message ) = @$test;
+
+ my $resolver = Test::MockModule->new('Net::DNS::Resolver');
+ $resolver->mock('send', sub {
+ my ($self, $domain, $type) = @_;
+ return Net::DNS::Packet->new;
+ });
+
pass "--- testing bad email '$email' gives error '$error_message'";
$mech->get_ok('/auth');
is_deeply $mech->page_errors, [], 'no errors initially';