diff options
author | Stan Hu <stanhu@gmail.com> | 2015-07-29 07:32:01 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-08-05 00:35:53 -0700 |
commit | 0c1ccda43fe04300a07a5f046a7c1cbae56cff32 (patch) | |
tree | 6d8a997d15e58813a78e0f2806543e0b2388f756 /spec/controllers/admin | |
parent | 4c9ba632e9468a0a8f37a031d0be90645ee6be2c (diff) | |
download | gitlab-ce-0c1ccda43fe04300a07a5f046a7c1cbae56cff32.tar.gz |
Add "Confirm user" button in user admin page
Closes #2116
Closes https://github.com/gitlabhq/gitlabhq/issues/9502
Diffstat (limited to 'spec/controllers/admin')
-rw-r--r-- | spec/controllers/admin/users_controller_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/controllers/admin/users_controller_spec.rb b/spec/controllers/admin/users_controller_spec.rb index 6f4c8987637..c40b2c2a583 100644 --- a/spec/controllers/admin/users_controller_spec.rb +++ b/spec/controllers/admin/users_controller_spec.rb @@ -37,6 +37,20 @@ describe Admin::UsersController do end end + describe 'PUT confirm/:id' do + let(:user) { create(:user, confirmed_at: nil) } + + before do + request.env["HTTP_REFERER"] = "/" + end + + it 'confirms user' do + put :confirm, id: user.username + user.reload + expect(user.confirmed?).to be_truthy + end + end + describe 'PATCH disable_two_factor' do let(:user) { create(:user) } |