diff options
Diffstat (limited to 't')
-rw-r--r-- | t/cobrand/national_assets.t | 30 | ||||
-rw-r--r-- | t/map/tests.t | 8 |
2 files changed, 34 insertions, 4 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(); diff --git a/t/map/tests.t b/t/map/tests.t index e6749b813..5575eafbb 100644 --- a/t/map/tests.t +++ b/t/map/tests.t @@ -3,11 +3,11 @@ use Test::More; my $requires = { 'Angus' => 'angus/js.js', - 'BathNES' => 'bathnes/js.js', + 'BathNES' => 'bathnes/assets.js', 'Bing' => 'map-bing-ol.js', - 'Bristol' => 'bristol/js.js', - 'Bromley' => 'bromley/map.js', - 'Buckinghamshire' => 'buckinghamshire/js.js', + 'Bristol' => 'bristol/assets.js', + 'Bromley' => 'bromley/assets.js', + 'Buckinghamshire' => 'buckinghamshire/assets.js', 'FMS' => 'map-fms.js', 'Google' => 'map-google.js', 'GoogleOL' => 'map-google-ol.js', |