aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@balti.ukcod.org.uk>2010-11-23 15:55:17 +0000
committerMatthew Somerville <matthew@balti.ukcod.org.uk>2010-11-23 16:54:56 +0000
commit8690e19d0fb7cc88f8e13a3f6cc46681c1ee95a4 (patch)
tree8d385abe7d09be04ffe6842ddffcba853840730e /t
parentd58a65d096223ec4e4cd09d734dc3e758a8484b3 (diff)
Have FixMyStreet::Geocode only deal in real co-ordinates.
Diffstat (limited to 't')
-rwxr-xr-xt/Page.t6
1 files changed, 2 insertions, 4 deletions
diff --git a/t/Page.t b/t/Page.t
index 831986f80..30925ff1b 100755
--- a/t/Page.t
+++ b/t/Page.t
@@ -41,14 +41,12 @@ sub test_geocode_string() {
my $q = new MockQuery('nosite', \%params);
# geocode a straightforward string, expect success
- 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");;
+ my ($easting, $northing, $error) = FixMyStreet::Geocode::string('Buckingham Palace', $q);
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) = FixMyStreet::Geocode::string('Falls Road, Belfast', $q);
+ ($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");
}