diff options
| author | Andrew Tomaka <atomaka@gmail.com> | 2015-12-01 23:40:24 -0500 |
|---|---|---|
| committer | Andrew Tomaka <atomaka@gmail.com> | 2015-12-02 08:07:29 -0500 |
| commit | daca985a6e75d6f43c5cc5b487a0942d5bf93f68 (patch) | |
| tree | 579e8734014953e8aaa1c784cd4a857e50c6ed79 /spec/features/admin | |
| parent | 09e712c0fb721059e4b2619eb9fc104257fc492d (diff) | |
| download | gitlab-ce-daca985a6e75d6f43c5cc5b487a0942d5bf93f68.tar.gz | |
Prevent impersonation if blocked
Diffstat (limited to 'spec/features/admin')
| -rw-r--r-- | spec/features/admin/admin_users_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/features/admin/admin_users_spec.rb b/spec/features/admin/admin_users_spec.rb index 86f01faffb4..4570e409128 100644 --- a/spec/features/admin/admin_users_spec.rb +++ b/spec/features/admin/admin_users_spec.rb @@ -128,6 +128,16 @@ describe "Admin::Users", feature: true do expect(page).not_to have_content('Impersonate') end + + it 'should not show impersonate button for blocked user' do + another_user.block + + visit admin_user_path(another_user) + + expect(page).not_to have_content('Impersonate') + + another_user.activate + end end context 'when impersonating' do |
