aboutsummaryrefslogtreecommitdiffstats
path: root/t/map/bing.t
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2021-10-07 13:32:40 +0200
committerMarius Halden <marius.h@lden.org>2021-10-07 13:32:40 +0200
commit09dacfc6b8bf62addeee16c20b1d90c2a256da96 (patch)
tree7caa2bf9e92227ab74448f9b746dd28bbcb81b2a /t/map/bing.t
parent585e57484f9c6332668bf1ac0a6a3b39dbe32223 (diff)
parentcea89fb87a96943708a1db0f646492fbfaaf000f (diff)
Merge tag 'v3.1' into fiksgatami-devfiksgatami-dev
Diffstat (limited to 't/map/bing.t')
-rw-r--r--t/map/bing.t12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/map/bing.t b/t/map/bing.t
new file mode 100644
index 000000000..ae8391871
--- /dev/null
+++ b/t/map/bing.t
@@ -0,0 +1,12 @@
+use Test::More;
+use FixMyStreet::Map::Bing;
+
+my $tiles = FixMyStreet::Map::Bing->map_tiles(x_tile => 8105, y_tile => 5375, zoom_act => 14);
+$tiles = [ map { m{ch/([^?]*)}; $1; } @$tiles ];
+is_deeply $tiles, [ '03131132323220', '03131132323221', '03131132323222', '03131132323223' ];
+
+$tiles = FixMyStreet::Map::Bing->map_tiles(x_tile => 8105, y_tile => 5375, zoom_act => 14, aerial => 1);
+$tiles = [ map { m{ch/([^?]*)\?.*A,G,L}; $1; } @$tiles ];
+is_deeply $tiles, [ '03131132323220', '03131132323221', '03131132323222', '03131132323223' ];
+
+done_testing();