diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-09-24 13:06:44 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-09-25 10:57:12 +0100 |
commit | cdd94a3de1445d0aea4dfc8c18cbae9e315bdda9 (patch) | |
tree | 86e5f23db56e5d632d00b812af8988a158997472 /t | |
parent | 785c6cebec327ebf1518c08f1447dbd12224b952 (diff) |
Speed up fetching lists of bodies.
Use a HashRefInflator wherever all_sorted is used, with consequential
changes to deal with it now not being an object (e.g. add some with_*
functions for manual fetching of extra data).
Diffstat (limited to 't')
-rw-r--r-- | t/app/controller/admin/defecttypes.t | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/t/app/controller/admin/defecttypes.t b/t/app/controller/admin/defecttypes.t index e7d0e42af..1eaab8414 100644 --- a/t/app/controller/admin/defecttypes.t +++ b/t/app/controller/admin/defecttypes.t @@ -28,6 +28,20 @@ FixMyStreet::override_config { ALLOWED_COBRANDS => ['oxfordshire'], }, sub { my $body = $mech->create_body_ok( 2237, 'Oxfordshire County Council' ); + subtest 'check defect types menu available to superusers' => sub { + my $user = $mech->create_user_ok( + 'superuser@example.com', + name => 'Test Superuser', + is_superuser => 1 + ); + + $mech->log_in_ok( $user->email ); + $mech->get_ok('/admin'); + $mech->content_contains('Defect Types'); + $mech->get_ok('/admin/defecttypes'); + $mech->log_out_ok(); + }; + my $user = $mech->create_user_ok( 'oxford@example.com', name => 'Test User', |