aboutsummaryrefslogtreecommitdiffstats
path: root/t/map
diff options
context:
space:
mode:
Diffstat (limited to 't/map')
-rw-r--r--t/map/mastermap.t22
-rw-r--r--t/map/tests.t2
2 files changed, 23 insertions, 1 deletions
diff --git a/t/map/mastermap.t b/t/map/mastermap.t
new file mode 100644
index 000000000..109142379
--- /dev/null
+++ b/t/map/mastermap.t
@@ -0,0 +1,22 @@
+use FixMyStreet::TestMech;
+
+use FixMyStreet::Map::MasterMap;
+
+subtest 'correct map tiles used' => sub {
+ my %test = (
+ 16 => [ '-', 'oml' ],
+ 20 => [ '.', 'mastermap' ]
+ );
+ foreach my $zoom (qw(16 20)) {
+ my $tiles = FixMyStreet::Map::MasterMap->map_tiles(x_tile => 123, y_tile => 456, zoom_act => $zoom);
+ my ($sep, $lyr) = @{$test{$zoom}};
+ is_deeply $tiles, [
+ "//a${sep}tilma.mysociety.org/$lyr/$zoom/122/455.png",
+ "//b${sep}tilma.mysociety.org/$lyr/$zoom/123/455.png",
+ "//c${sep}tilma.mysociety.org/$lyr/$zoom/122/456.png",
+ "//tilma.mysociety.org/$lyr/$zoom/123/456.png",
+ ];
+ }
+};
+
+done_testing();
diff --git a/t/map/tests.t b/t/map/tests.t
index f1f29dc06..499447ad5 100644
--- a/t/map/tests.t
+++ b/t/map/tests.t
@@ -2,7 +2,6 @@ use FixMyStreet::Map;
use Test::More;
my $requires = {
- 'Bexley' => 'map-bexley.js',
'Bing' => 'map-bing-ol.js',
'Bristol' => 'map-wmts-bristol.js',
'Bromley' => 'map-fms.js',
@@ -14,6 +13,7 @@ my $requires = {
'Hounslow' => 'map-wmts-hounslow.js',
'IsleOfWight' => 'map-wmts-isleofwight.js',
'OSM' => 'OpenStreetMap.js',
+ 'MasterMap' => 'map-mastermap.js',
'CycleMap' => 'OpenStreetMap.js',
'MapQuest' => 'OpenStreetMap.js',
'StreetView' => 'map-streetview.js',