diff options
author | Matthew Somerville <matthew@mysociety.org> | 2019-07-11 17:50:52 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2019-07-12 17:22:39 +0100 |
commit | 056118883562df7f7cf4d917ffbac0a6f1f1faef (patch) | |
tree | 2570ec7ff966a7ca82c6fc38e5991844bd0144a7 /t/cobrand/bexley.t | |
parent | 58fe7b2c649c29b09338c8ea76314aef29385bf5 (diff) |
[Bexley] Include subcategory in dashboard export.
Diffstat (limited to 't/cobrand/bexley.t')
-rw-r--r-- | t/cobrand/bexley.t | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/t/cobrand/bexley.t b/t/cobrand/bexley.t index f72b7e7c4..f227e7450 100644 --- a/t/cobrand/bexley.t +++ b/t/cobrand/bexley.t @@ -33,7 +33,9 @@ $mech->create_contact_ok(body_id => $body->id, category => 'Abandoned and untaxe $mech->create_contact_ok(body_id => $body->id, category => 'Lamp post', email => "LAMP"); $mech->create_contact_ok(body_id => $body->id, category => 'Parks and open spaces', email => "PARK"); $mech->create_contact_ok(body_id => $body->id, category => 'Dead animal', email => "ANIM"); -$mech->create_contact_ok(body_id => $body->id, category => 'Something dangerous', email => "DANG"); +my $category = $mech->create_contact_ok(body_id => $body->id, category => 'Something dangerous', email => "DANG"); +$category->set_extra_metadata(group => 'Danger things'); +$category->update; FixMyStreet::override_config { ALLOWED_COBRANDS => [ 'bexley' ], @@ -119,6 +121,12 @@ FixMyStreet::override_config { $mech->content_lacks('Resend report'); }; + subtest 'extra CSV column present' => sub { + $mech->get_ok('/dashboard?export=1'); + $mech->content_contains(',Category,Subcategory,'); + $mech->content_contains('"Danger things","Something dangerous"'); + }; + }; subtest 'nearest road returns correct road' => sub { |