diff options
Diffstat (limited to 't/cobrand/tfl.t')
-rw-r--r-- | t/cobrand/tfl.t | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/t/cobrand/tfl.t b/t/cobrand/tfl.t index f8e0a11c8..cf1ec1c41 100644 --- a/t/cobrand/tfl.t +++ b/t/cobrand/tfl.t @@ -23,6 +23,10 @@ FixMyStreet::DB->resultset('BodyArea')->find_or_create({ area_id => 2457, # Epsom Ewell, outside London, for bus stop test body_id => $body->id, }); +FixMyStreet::DB->resultset('BodyArea')->find_or_create({ + area_id => 2508, # Hackney + body_id => $body->id, +}); my $superuser = $mech->create_user_ok('superuser@example.com', name => 'Super User', is_superuser => 1); my $staffuser = $mech->create_user_ok('counciluser@example.com', name => 'Council User', from_body => $body, password => 'password'); $staffuser->user_body_permissions->create({ @@ -58,6 +62,13 @@ my $bromley_flytipping = $mech->create_contact_ok( $bromley_flytipping->set_extra_metadata(group => [ 'Street cleaning' ]); $bromley_flytipping->update; +my $hackney = $mech->create_body_ok(2508, 'Hackney Council'); +$mech->create_contact_ok( + body_id => $hackney->id, + category => 'Abandoned Vehicle', + email => 'av-hackney@example.com', +); + my $contact1 = $mech->create_contact_ok( body_id => $body->id, category => 'Bus stops', @@ -748,7 +759,7 @@ subtest 'Test no questionnaire sending' => sub { }; FixMyStreet::override_config { - ALLOWED_COBRANDS => [ 'tfl', 'bromley', 'fixmystreet' ], + ALLOWED_COBRANDS => [ 'tfl', 'bromley', 'fixmystreet', 'hackney' ], MAPIT_URL => 'http://mapit.uk/', COBRAND_FEATURES => { internal_ips => { tfl => [ '127.0.0.1' ] }, @@ -864,6 +875,21 @@ for my $test ( 'Trees' ], }, + { + host => 'hackney.fixmystreet.com', + name => "test no hackney categories on red route", + lat => 51.552287, + lon => -0.063326, + expected => [ + 'Bus stops', + 'Flooding', + 'Grit bins', + 'Pothole', + 'Timings', + 'Traffic lights', + 'Trees' + ], + }, ) { subtest $test->{name} . ' on ' . $test->{host} => sub { $mech->host($test->{host}); |