diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2019-05-24 12:43:23 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2019-05-28 17:19:27 +0100 |
commit | 4b88125da243aba9ad9754619c53cd5c50512c6d (patch) | |
tree | 89ec74c2e902db8f49b7be7c675197881fa1c4c3 /t/app/controller/admin | |
parent | c34949cf7bc386f057781b8d7b7a97c3aa9db2da (diff) |
Add role to users from admin user list page.
Diffstat (limited to 't/app/controller/admin')
-rw-r--r-- | t/app/controller/admin/users.t | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/t/app/controller/admin/users.t b/t/app/controller/admin/users.t index 534034f1d..ce29a5f7c 100644 --- a/t/app/controller/admin/users.t +++ b/t/app/controller/admin/users.t @@ -88,6 +88,14 @@ subtest 'user search' => sub { $mech->content_contains('test@example.com'); }; +subtest 'user assign role' => sub { + $user->remove_from_roles($role); + is $user->roles->count, 0; + $mech->get_ok('/admin/users'); + $mech->submit_form_ok({ with_fields => { uid => $user->id, roles => $role->id } }); + is $user->roles->count, 1; +}; + subtest 'search does not show user from another council' => sub { FixMyStreet::override_config { ALLOWED_COBRANDS => [ 'oxfordshire' ], |