aboutsummaryrefslogtreecommitdiffstats
path: root/t/cobrand
diff options
context:
space:
mode:
authorM Somerville <matthew-github@dracos.co.uk>2019-06-07 14:25:41 +0100
committerMatthew Somerville <matthew@mysociety.org>2019-06-07 17:16:16 +0100
commit9f82fbb4088e32a3ca636a5ccc1e7495e34e73e5 (patch)
treee96948127aa041161bac617c336345138eb95fac /t/cobrand
parent2f6b889481265549a729ad78f63fc8d1660c126f (diff)
[Hounslow] Hide TfL Traffic Lights category.
It is handled by an existing category.
Diffstat (limited to 't/cobrand')
-rw-r--r--t/cobrand/hounslow.t22
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();