diff options
Diffstat (limited to 'spec/controllers/admin/users_controller_spec.rb')
-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) } |