diff options
author | Matthew Somerville <matthew@mysociety.org> | 2016-01-29 15:12:29 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2016-01-29 15:12:29 +0000 |
commit | 68dda6c87e0ea01e9934b18f1061c0066f352e9e (patch) | |
tree | 2de1c83495b7e905beb75d225a8d4044c0a718e2 /t/app | |
parent | 32cc764609a304fb09718e91ca836c8788db1f51 (diff) | |
parent | b4e69645bd2ff24fb603bf7461e2c80b316eaeaa (diff) |
Merge branch '1315-open311-update-media_url'
Diffstat (limited to 't/app')
-rw-r--r-- | t/app/controller/alert.t | 4 | ||||
-rw-r--r-- | t/app/controller/around.t | 4 | ||||
-rw-r--r-- | t/app/controller/auth_social.t | 8 | ||||
-rw-r--r-- | t/app/controller/report_import.t | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/t/app/controller/alert.t b/t/app/controller/alert.t index 5bf2af428..c7dc9ed09 100644 --- a/t/app/controller/alert.t +++ b/t/app/controller/alert.t @@ -6,7 +6,7 @@ use LWP::Protocol::PSGI; use FixMyStreet::TestMech; my $mech = FixMyStreet::TestMech->new; -use t::Nominatim; +use t::Mock::Nominatim; # check that we can get the page $mech->get_ok('/alert'); @@ -42,7 +42,7 @@ FixMyStreet::override_config { $mech->content_contains('ward:2651:20728:City_of_Edinburgh:City_Centre'); subtest "Test Nominatim lookup" => sub { - LWP::Protocol::PSGI->register(t::Nominatim->run_if_script, host => 'nominatim.openstreetmap.org'); + LWP::Protocol::PSGI->register(t::Mock::Nominatim->run_if_script, host => 'nominatim.openstreetmap.org'); $mech->get_ok('/alert/list?pc=High Street'); $mech->content_contains('We found more than one match for that location'); }; diff --git a/t/app/controller/around.t b/t/app/controller/around.t index a70116525..89ca5246e 100644 --- a/t/app/controller/around.t +++ b/t/app/controller/around.t @@ -3,7 +3,7 @@ use warnings; use Test::More; use LWP::Protocol::PSGI; -use t::MapIt; +use t::Mock::MapIt; use FixMyStreet::TestMech; my $mech = FixMyStreet::TestMech->new; @@ -84,7 +84,7 @@ foreach my $test ( ) { subtest "check lat/lng for '$test->{pc}'" => sub { - LWP::Protocol::PSGI->register(t::MapIt->run_if_script, host => 'mapit.uk'); + LWP::Protocol::PSGI->register(t::Mock::MapIt->run_if_script, host => 'mapit.uk'); $mech->get_ok('/'); FixMyStreet::override_config { 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'); diff --git a/t/app/controller/report_import.t b/t/app/controller/report_import.t index 1d6695996..220ebaac5 100644 --- a/t/app/controller/report_import.t +++ b/t/app/controller/report_import.t @@ -3,7 +3,7 @@ use warnings; use Test::More; use LWP::Protocol::PSGI; -use t::MapIt; +use t::Mock::MapIt; use FixMyStreet::TestMech; use FixMyStreet::App; use Web::Scraper; @@ -92,7 +92,7 @@ subtest "Test creating bad partial entries" => sub { }; subtest "Submit a correct entry" => sub { - LWP::Protocol::PSGI->register(t::MapIt->run_if_script, host => 'mapit.uk'); + LWP::Protocol::PSGI->register(t::Mock::MapIt->run_if_script, host => 'mapit.uk'); $mech->get_ok('/import'); |