diff options
Diffstat (limited to 't/app/controller/auth_social.t')
-rw-r--r-- | t/app/controller/auth_social.t | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/t/app/controller/auth_social.t b/t/app/controller/auth_social.t index 52cc2766c..09fdf22d3 100644 --- a/t/app/controller/auth_social.t +++ b/t/app/controller/auth_social.t @@ -1,6 +1,7 @@ use strict; use warnings; use Test::More; +use Test::MockModule; use LWP::Protocol::PSGI; use LWP::Simple; use JSON::MaybeXS; @@ -27,6 +28,9 @@ FixMyStreet::override_config { my $fb_email = 'facebook@example.org'; my $fb_uid = 123456789; +my $resolver = Test::MockModule->new('Email::Valid'); +$resolver->mock('address', sub { 'facebook@example.org' }); + for my $fb_state ( 'refused', 'no email', 'existing UID', 'okay' ) { for my $page ( 'my', 'report', 'update' ) { subtest "test FB '$fb_state' login for page '$page'" => sub { @@ -135,6 +139,8 @@ for my $fb_state ( 'refused', 'no email', 'existing UID', 'okay' ) { } } +$resolver->mock('address', sub { 'twitter@example.org' }); + my $tw_email = 'twitter@example.org'; my $tw_uid = 987654321; |