aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/auth_social.t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2016-01-27 11:38:11 +0000
committerMatthew Somerville <matthew@mysociety.org>2016-01-27 11:38:11 +0000
commit2679b30e530861ba7c2bef6f36a60242872bd6a7 (patch)
tree7cec1bc797b30f7efb8b4eae0549bcebd1c96e07 /t/app/controller/auth_social.t
parentb8083a462aebf542f6f39c4201e1f09248b7e0e7 (diff)
Move test mocks to their own directory.
Diffstat (limited to 't/app/controller/auth_social.t')
-rw-r--r--t/app/controller/auth_social.t8
1 files changed, 4 insertions, 4 deletions
diff --git a/t/app/controller/auth_social.t b/t/app/controller/auth_social.t
index 173572b02..84fdd4dfe 100644
--- a/t/app/controller/auth_social.t
+++ b/t/app/controller/auth_social.t
@@ -5,8 +5,8 @@ use LWP::Protocol::PSGI;
use LWP::Simple;
use JSON::MaybeXS;
-use t::Facebook;
-use t::MapIt;
+use t::Mock::Facebook;
+use t::Mock::MapIt;
use FixMyStreet::TestMech;
my $mech = FixMyStreet::TestMech->new;
@@ -17,7 +17,7 @@ END { FixMyStreet::App->log->enable('info'); }
my ($report) = $mech->create_problems_for_body(1, '2345', 'Test');
-LWP::Protocol::PSGI->register(t::MapIt->to_psgi_app, host => 'mapit.uk');
+LWP::Protocol::PSGI->register(t::Mock::MapIt->to_psgi_app, host => 'mapit.uk');
FixMyStreet::override_config {
FACEBOOK_APP_ID => 'facebook-app-id',
@@ -40,7 +40,7 @@ for my $fb_state ( 'refused', 'no email', 'existing UID', 'okay' ) {
}
# Set up a mock to catch (most, see below) requests to Facebook
- my $fb = t::Facebook->new;
+ my $fb = t::Mock::Facebook->new;
$fb->returns_email(0) if $fb_state eq 'no email' || $fb_state eq 'existing UID';
LWP::Protocol::PSGI->register($fb->to_psgi_app, host => 'www.facebook.com');
LWP::Protocol::PSGI->register($fb->to_psgi_app, host => 'graph.facebook.com');