aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/auth.t
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2016-12-16 15:02:53 +0100
committerMarius Halden <marius.h@lden.org>2016-12-16 15:02:53 +0100
commitdbf56159e44c1560a413022451bf1a1c4cb22a52 (patch)
tree275599a1894ca48d8dbf3c2843064c3dbf4affc7 /t/app/controller/auth.t
parenta1603b96cae9258761f8cc59d76e0512f49afc3d (diff)
parent38490f6ea18064c232bda6ebfbaee052bd8f0951 (diff)
Merge tag 'v2.0.1' into fiksgatami-dev-v2
Diffstat (limited to 't/app/controller/auth.t')
-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';