diff options
author | Matthew Somerville <matthew@mysociety.org> | 2019-06-17 15:01:35 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2019-06-17 15:01:35 +0100 |
commit | 38c61346ca940f837b49fba3bc0548dd21b7ee39 (patch) | |
tree | b605969bcc42abc34f71cd2f5d93a6d4fd0e7151 /t/app/controller/report_new.t | |
parent | 4fb17bc32eda72ad8649b0218a37f4e9b50b5085 (diff) | |
parent | c6b480d08c7aa9f8a08467e2631f7daa30b3be7e (diff) |
Merge branch 'issues/2475-multiple-parents-for-categories'
Diffstat (limited to 't/app/controller/report_new.t')
-rw-r--r-- | t/app/controller/report_new.t | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/t/app/controller/report_new.t b/t/app/controller/report_new.t index 848529686..f65ca243d 100644 --- a/t/app/controller/report_new.t +++ b/t/app/controller/report_new.t @@ -1271,16 +1271,18 @@ subtest "Test inactive categories" => sub { }; subtest "category groups" => sub { - my $cobrand = Test::MockModule->new('FixMyStreet::Cobrand::FixMyStreet'); - $cobrand->mock('enable_category_groups', sub { 1 }); FixMyStreet::override_config { ALLOWED_COBRANDS => 'fixmystreet', MAPIT_URL => 'http://mapit.uk/', + COBRAND_FEATURES => { + 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>}); }; }; |