summaryrefslogtreecommitdiff
path: root/spec/requests
diff options
context:
space:
mode:
authorDaniel Juarez <daniel.juarez.gonzalez@cern.ch>2017-11-21 15:47:58 +0000
committerRémy Coutable <remy@rymai.me>2017-11-21 15:47:58 +0000
commit0b9e1e16626eff4cd8ae43ce47ec0f965beaf843 (patch)
tree4171348087b509348c59bb7d35f55fe6f5972f81 /spec/requests
parent28a5f5f2e91297a56369c39e96be25187ad0a1dd (diff)
downloadgitlab-ce-0b9e1e16626eff4cd8ae43ce47ec0f965beaf843.tar.gz
Skip confirmation user api
Diffstat (limited to 'spec/requests')
-rw-r--r--spec/requests/api/users_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/requests/api/users_spec.rb b/spec/requests/api/users_spec.rb
index 2aeae6f9ec7..2428e63e149 100644
--- a/spec/requests/api/users_spec.rb
+++ b/spec/requests/api/users_spec.rb
@@ -510,6 +510,14 @@ describe API::Users do
expect(user.reload.notification_email).to eq('new@email.com')
end
+ it 'skips reconfirmation when requested' do
+ put api("/users/#{user.id}", admin), { skip_reconfirmation: true }
+
+ user.reload
+
+ expect(user.confirmed_at).to be_present
+ end
+
it 'updates user with his own username' do
put api("/users/#{user.id}", admin), username: user.username