diff options
Diffstat (limited to 't')
-rw-r--r-- | t/cobrand/hounslow.t | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/t/cobrand/hounslow.t b/t/cobrand/hounslow.t index 5d9f022e7..417bc7736 100644 --- a/t/cobrand/hounslow.t +++ b/t/cobrand/hounslow.t @@ -3,6 +3,18 @@ use FixMyStreet::TestMech; ok( my $mech = FixMyStreet::TestMech->new, 'Created mech object' ); my $hounslow_id = $mech->create_body_ok(2483, 'Hounslow Borough Council')->id; +$mech->create_contact_ok( + body_id => $hounslow_id, + category => 'Potholes', + email => 'pothole@example.org', +); + +my $tfl = $mech->create_body_ok( 2483, 'TfL'); +$mech->create_contact_ok( + body_id => $tfl->id, + category => 'Traffic lights', + email => 'tfl@example.org', +); $mech->create_problems_for_body(1, $hounslow_id, 'An old problem made before Hounslow FMS launched', { confirmed => '2018-12-25 09:00', @@ -41,4 +53,14 @@ subtest "it does not show old reports on Hounslow" => sub { }; }; +subtest "does not show TfL traffic lights category" => sub { + FixMyStreet::override_config { + MAPIT_URL => 'http://mapit.uk/', + ALLOWED_COBRANDS => 'fixmystreet', + }, sub { + my $json = $mech->get_ok_json('/report/new/ajax?latitude=51.482286&longitude=-0.328163'); + is $json->{by_category}{"Traffic lights"}, undef; + }; +}; + done_testing(); |