blob: 37842519305e5d2c70c431982ff06c0faa7812bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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();
|