diff options
author | DJ Mountney <david@twkie.net> | 2017-03-31 13:06:15 -0700 |
---|---|---|
committer | DJ Mountney <david@twkie.net> | 2017-04-04 10:18:56 -0700 |
commit | a766f60a0be65a5f8af3f4328c1bcdc505948d15 (patch) | |
tree | 59cac43333d9c8ce84380b01502b8824202e98d3 /spec/lib | |
parent | 93de37ce1bd0f5ce015287f0729d625ddf6f7390 (diff) | |
download | gitlab-ce-a766f60a0be65a5f8af3f4328c1bcdc505948d15.tar.gz |
Inlude the password_automatically_check param as permitted config in the user create_servicefix-password-required-check
This param is passed to service in two places, one is in the build_user for non ldap oauth users. And the other is in the initial production admin user seed data.
Without this change, when setting up GitLab in a production environment, you were not being given the option of setting the root password on initial setup in the UI.
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/o_auth/user_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/lib/gitlab/o_auth/user_spec.rb b/spec/lib/gitlab/o_auth/user_spec.rb index 6c84a4c8b73..8f09266c3b3 100644 --- a/spec/lib/gitlab/o_auth/user_spec.rb +++ b/spec/lib/gitlab/o_auth/user_spec.rb @@ -40,6 +40,15 @@ describe Gitlab::OAuth::User, lib: true do let(:provider) { 'twitter' } describe 'signup' do + it 'marks user as having password_automatically_set' do + stub_omniauth_config(allow_single_sign_on: ['twitter'], external_providers: ['twitter']) + + oauth_user.save + + expect(gl_user).to be_persisted + expect(gl_user).to be_password_automatically_set + end + shared_examples 'to verify compliance with allow_single_sign_on' do context 'provider is marked as external' do it 'marks user as external' do |