diff options
author | Steven Day <steve@mysociety.org> | 2015-09-30 11:31:56 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2015-10-01 13:51:05 +0100 |
commit | daada5411eb2edcd27111abadbd66c9b368c65b0 (patch) | |
tree | b5a1259a6f46a5583fc512673b0618f2f5449df1 /t/app/controller/reports.t | |
parent | 918908feca5a33f3b070cd03b71383efb3fbe9c8 (diff) |
Exclude deleted categories from the all reports page filters
Diffstat (limited to 't/app/controller/reports.t')
-rw-r--r-- | t/app/controller/reports.t | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/t/app/controller/reports.t b/t/app/controller/reports.t index ecb43f447..02625fcc7 100644 --- a/t/app/controller/reports.t +++ b/t/app/controller/reports.t @@ -216,5 +216,28 @@ subtest "test fiksgatami all reports page" => sub { } }; +subtest "test greenwich all reports page" => sub { + FixMyStreet::override_config { + ALLOWED_COBRANDS => [ 'greenwich' ], + MAPIT_URL => 'http://mapit.mysociety.org/' + }, sub { + my $body = $mech->create_body_ok(2493, 'Royal Borough of Greenwich'); + my $deleted_contact = $mech->create_contact_ok( + body_id => $body->id, + category => 'Deleted', + email => 'deleted@example.com', + deleted => 1 + ); + ok $mech->host("greenwich.fixmystreet.com"), 'change host to greenwich'; + $mech->get_ok('/reports/Royal+Borough+of+Greenwich'); + # There should not be deleted categories in the list + my $category_select = $mech->forms()->[0]->find_input('filter_category'); + is $category_select->possible_values, 1, 'deleted categories are not shown'; + + # Clean up after the test + $deleted_contact->delete; + } +}; + done_testing(); |