aboutsummaryrefslogtreecommitdiffstats
path: root/t/map/tests.t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-11-15 17:35:29 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-11-15 17:35:29 +0000
commitdb75de1ca7268692215dc79f157d61ab7d66fa8e (patch)
treecb2095aa1f8466919b25674c35f7b8d1bbbabcde /t/map/tests.t
parent52ab72ad43b391b0f3b6f7385b5ba723cc1a4aba (diff)
parentf59e12ee3fa9c65f178a300954586f6ac91bba79 (diff)
Merge branch '1901-js-deferring'
Updated geolocation.js with concurrent changes.
Diffstat (limited to 't/map/tests.t')
-rw-r--r--t/map/tests.t29
1 files changed, 29 insertions, 0 deletions
diff --git a/t/map/tests.t b/t/map/tests.t
new file mode 100644
index 000000000..f34ccfa6d
--- /dev/null
+++ b/t/map/tests.t
@@ -0,0 +1,29 @@
+use FixMyStreet::Map;
+use Test::More;
+
+my $requires = {
+ 'Angus' => 'angus/js.js',
+ 'Bing' => 'map-bing-ol.js',
+ 'Bristol' => 'map-wmts-bristol.js',
+ 'Bromley' => 'bromley/map.js',
+ 'FMS' => 'map-fms.js',
+ 'Google' => 'map-google.js',
+ 'GoogleOL' => 'map-google-ol.js',
+ 'OSM' => 'OpenStreetMap.js',
+ 'CycleMap' => 'OpenStreetMap.js',
+ 'MapQuest' => 'OpenStreetMap.js',
+ 'StreetView' => 'map-streetview.js',
+ 'TonerLite' => 'map-toner-lite.js',
+ 'Zurich' => 'map-wmts-zurich.js',
+};
+
+foreach (FixMyStreet::Map->maps) {
+ next if /WMTSBase/; # Only its subclasses have JS
+ my $js = $_->map_javascript;
+ my $test_file = $js->[-1];
+ s/.*:://;
+ isnt $requires->{$_}, undef, "$_ requires present";
+ like $test_file, qr/$requires->{$_}/, "$_ JS okay";
+}
+
+done_testing();