diff options
author | Matthew Somerville <matthew@mysociety.org> | 2020-07-28 14:23:04 +0100 |
---|---|---|
committer | M Somerville <matthew-github@dracos.co.uk> | 2020-11-11 10:29:20 +0000 |
commit | 1a90fc2428eeca48347c8dc31f00ca6053e772bf (patch) | |
tree | f0f6db1e5925c7a0d9ccf7b4273fbacf50acf29f /t/app/controller/waste.t | |
parent | 627daaad7d21817a301bcf604e15d230a4dca1c1 (diff) |
[Bromley] Check service unit as well as property.
If someone else in a block of flats has reported a missed collection,
others in the same service unit should not be able to report also.
Fixes https://github.com/mysociety/fixmystreet-commercial/issues/1945
Diffstat (limited to 't/app/controller/waste.t')
-rw-r--r-- | t/app/controller/waste.t | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/t/app/controller/waste.t b/t/app/controller/waste.t index aac898da9..c86802631 100644 --- a/t/app/controller/waste.t +++ b/t/app/controller/waste.t @@ -61,15 +61,16 @@ FixMyStreet::override_config { }; subtest 'Thing already requested' => sub { $mech->content_contains('A food waste collection has been reported as missed'); + $mech->content_contains('A paper & cardboard collection has been reported as missed'); # as part of service unit, not property }; subtest 'Report a missed bin' => sub { $mech->content_contains('service-101', 'Can report, last collection was 27th'); - $mech->content_contains('service-537', 'Can report, last collection was 27th'); + $mech->content_lacks('service-537', 'Cannot report, last collection was 27th but the service unit has a report'); $mech->content_lacks('service-535', 'Cannot report, last collection was 20th'); $mech->content_lacks('service-542', 'Cannot report, last collection was 18th'); $mech->follow_link_ok({ text => 'Report a missed collection' }); $mech->content_contains('service-101', 'Checkbox, last collection was 27th'); - $mech->content_contains('service-537', 'Checkbox, last collection was 27th'); + $mech->content_lacks('service-537', 'No checkbox, last collection was 27th but the service unit has a report'); $mech->content_lacks('service-535', 'No checkbox, last collection was 20th'); $mech->content_lacks('service-542', 'No checkbox, last collection was 18th'); $mech->submit_form_ok({ form_number => 2 }); |