aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/around.t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-03-28 10:12:56 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-03-28 10:12:56 +0100
commitb76cfb3889140f1c771c1f98254f724aad3d4297 (patch)
treebb7beada7a603119ea2897f54a6af96814d850e1 /t/app/controller/around.t
parent3f21a9742d89c3e4fda47a0be6ec2a17f802c99a (diff)
parenta8ceae6c99b00aefcba301b2f41033d84701f56a (diff)
Merge branch 'offline-tests'
Diffstat (limited to 't/app/controller/around.t')
-rw-r--r--t/app/controller/around.t20
1 files changed, 8 insertions, 12 deletions
diff --git a/t/app/controller/around.t b/t/app/controller/around.t
index 9e2e7c524..c8aca04aa 100644
--- a/t/app/controller/around.t
+++ b/t/app/controller/around.t
@@ -1,9 +1,7 @@
use strict;
use warnings;
use Test::More;
-use LWP::Protocol::PSGI;
-use t::Mock::MapIt;
use FixMyStreet::TestMech;
my $mech = FixMyStreet::TestMech->new;
@@ -17,7 +15,7 @@ subtest "check that if no query we get sent back to the homepage" => sub {
subtest "redirect x,y requests to lat/lon (301 - permanent)" => sub {
FixMyStreet::override_config {
- MAPIT_URL => 'http://mapit.mysociety.org/',
+ MAPIT_URL => 'http://mapit.uk/',
}, sub {
$mech->get_ok('/around?x=3281&y=1113');
};
@@ -73,8 +71,8 @@ foreach my $test (
foreach my $test (
{
pc => 'SW1A 1AA',
- latitude => '51.5',
- longitude => '-2.1',
+ latitude => '51.501009',
+ longitude => '-0.141588',
},
{
pc => 'TQ 388 773',
@@ -84,8 +82,6 @@ foreach my $test (
)
{
subtest "check lat/lng for '$test->{pc}'" => sub {
- LWP::Protocol::PSGI->register(t::Mock::MapIt->run_if_script, host => 'mapit.uk');
-
$mech->get_ok('/');
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ { 'fixmystreet' => '.' } ],
@@ -102,7 +98,7 @@ foreach my $test (
subtest 'check non public reports are not displayed on around page' => sub {
my $params = {
- postcode => 'EH99 1SP',
+ postcode => 'EH1 1BB',
latitude => 55.9519637512,
longitude => -3.17492254484,
};
@@ -112,9 +108,9 @@ subtest 'check non public reports are not displayed on around page' => sub {
$mech->get_ok('/');
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ { 'fixmystreet' => '.' } ],
- MAPIT_URL => 'http://mapit.mysociety.org/',
+ MAPIT_URL => 'http://mapit.uk/',
}, sub {
- $mech->submit_form_ok( { with_fields => { pc => 'EH99 1SP' } },
+ $mech->submit_form_ok( { with_fields => { pc => 'EH1 1BB' } },
"good location" );
};
$mech->content_contains( 'Around page Test 3 for 2651',
@@ -126,9 +122,9 @@ subtest 'check non public reports are not displayed on around page' => sub {
$mech->get_ok('/');
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ { 'fixmystreet' => '.' } ],
- MAPIT_URL => 'http://mapit.mysociety.org/',
+ MAPIT_URL => 'http://mapit.uk/',
}, sub {
- $mech->submit_form_ok( { with_fields => { pc => 'EH99 1SP' } },
+ $mech->submit_form_ok( { with_fields => { pc => 'EH1 1BB' } },
"good location" );
};
$mech->content_lacks( 'Around page Test 3 for 2651',