diff options
author | Struan Donald <struan@exo.org.uk> | 2018-04-04 09:49:38 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-08-03 21:35:40 +0100 |
commit | 30426bc093541066f8cc2f40b4a23261d5e4526c (patch) | |
tree | 528a2d6b8f481ba63f31f0ef09477445678a5e62 /t/cobrand | |
parent | 9f341adabd2a22de7e13c43e860bb3741017bf58 (diff) |
[UK] Pull in cobrand asset files on national site.
Also add body name to layer defaults, so they are only used where appropriate.
Switch mapit area javascript calls to GeoJSON, so we can drop KML support in
OpenLayers.wfs.js which saves a small amount of bandwidth.
Diffstat (limited to 't/cobrand')
-rw-r--r-- | t/cobrand/national_assets.t | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/t/cobrand/national_assets.t b/t/cobrand/national_assets.t new file mode 100644 index 000000000..378425193 --- /dev/null +++ b/t/cobrand/national_assets.t @@ -0,0 +1,30 @@ +use FixMyStreet::TestMech; +my $mech = FixMyStreet::TestMech->new; + +# Create test data +my $body = $mech->create_body_ok( 2561, 'Bristol County Council' ); + + +subtest 'cobrand assets includes cobrand assets javascript', sub { + FixMyStreet::override_config { + ALLOWED_COBRANDS => [ 'fixmystreet' ], + MAPIT_URL => 'http://mapit.uk/', + }, sub { + $mech->get_ok("/report/new?latitude=51.494885&longitude=-2.602237"); + $mech->content_contains('buckinghamshire/assets.js'); + }; +}; + +subtest 'cobrand assets includes not applied on cobrand sites', sub { + FixMyStreet::override_config { + ALLOWED_COBRANDS => [ 'bathnes' ], + MAPIT_URL => 'http://mapit.uk/', + MAP_TYPE => 'FMS,OSM,BathNES,Buckinghamshire', + }, sub { + $mech->get_ok("/report/new?latitude=51.494885&longitude=-2.602237"); + $mech->content_lacks('buckinghamshire/assets.js'); + $mech->content_contains('bathnes/assets.js'); + }; +}; + +done_testing(); |