Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Juarez <daniel.juarez.gonzalez@cern.ch>2017-11-21 18:47:58 +0300
committerRémy Coutable <remy@rymai.me>2017-11-21 18:47:58 +0300
commit0b9e1e16626eff4cd8ae43ce47ec0f965beaf843 (patch)
tree4171348087b509348c59bb7d35f55fe6f5972f81 /spec/requests/api/users_spec.rb
parent28a5f5f2e91297a56369c39e96be25187ad0a1dd (diff)
Skip confirmation user api
Diffstat (limited to 'spec/requests/api/users_spec.rb')
-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