aboutsummaryrefslogtreecommitdiffstats
path: root/t/Page.t
diff options
context:
space:
mode:
Diffstat (limited to 't/Page.t')
-rwxr-xr-xt/Page.t5
1 files changed, 3 insertions, 2 deletions
diff --git a/t/Page.t b/t/Page.t
index 26962c743..831986f80 100755
--- a/t/Page.t
+++ b/t/Page.t
@@ -20,6 +20,7 @@ use lib "$FindBin::Bin/../perllib";
use lib "$FindBin::Bin/../commonlib/perllib";
use Page;
+use FixMyStreet::Geocode;
use mySociety::MockQuery;
use mySociety::Locale;
@@ -40,14 +41,14 @@ sub test_geocode_string() {
my $q = new MockQuery('nosite', \%params);
# geocode a straightforward string, expect success
- my ($x, $y, $easting, $northing, $error) = Page::geocode_string('Buckingham Palace', $q);
+ my ($x, $y, $easting, $northing, $error) = FixMyStreet::Geocode::string('Buckingham Palace', $q);
ok($x == 3280, 'example x coordinate generated') or diag("Got $x");
ok($y == 1114, 'example y coordinate generated') or diag("Got $y");;
ok($easting == 529044, 'example easting generated') or diag("Got $easting");
ok($northing == 179619, 'example northing generated') or diag("Got $northing");
ok(! defined($error), 'should not generate error for simple example') or diag("Got $error");
# expect a failure message for Northern Ireland
- ($x, $y, $easting, $northing, $error) = Page::geocode_string('Falls Road, Belfast', $q);
+ ($x, $y, $easting, $northing, $error) = FixMyStreet::Geocode::string('Falls Road, Belfast', $q);
ok($error eq "We do not cover Northern Ireland, I'm afraid, as our licence doesn't include any maps for the region.", 'error message produced for NI location') or diag("Got $error");
}