diff options
author | Struan Donald <struan@exo.org.uk> | 2019-05-16 15:44:45 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2019-06-17 14:24:22 +0100 |
commit | a2280170ea13758b6b9d042351801d81b576beeb (patch) | |
tree | 090e6e46fbafef6d1e5ab82d8f3c5b0c96af0fab /t/app/controller | |
parent | fd39e58506c712ce691a13485fa7f8184c22213a (diff) |
display category under multiple groups
The group metadata of a contact can now be a comma separated list of
groups under which to display the category
For #2475
Diffstat (limited to 't/app/controller')
-rw-r--r-- | t/app/controller/report_new.t | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/t/app/controller/report_new.t b/t/app/controller/report_new.t index d6b256be1..f65ca243d 100644 --- a/t/app/controller/report_new.t +++ b/t/app/controller/report_new.t @@ -1278,10 +1278,11 @@ subtest "category groups" => sub { category_groups => { fixmystreet => 1 } } }, sub { - $contact2->update( { extra => { group => 'Roads' } } ); + $contact2->update( { extra => { group => ['Roads','Pavements'] } } ); $contact9->update( { extra => { group => 'Roads' } } ); $contact10->update( { extra => { group => 'Roads' } } ); $mech->get_ok("/report/new?lat=$saved_lat&lon=$saved_lon"); + $mech->content_like(qr{<optgroup label="Pavements">\s*<option value='Potholes'>Potholes</option></optgroup>}); $mech->content_like(qr{<optgroup label="Roads">\s*<option value='Potholes'>Potholes</option>\s*<option value='Street lighting'>Street lighting</option></optgroup>}); }; }; |