diff options
author | Robert Speicher <robert@gitlab.com> | 2017-04-27 20:41:16 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2017-04-27 20:41:16 +0000 |
commit | fd31d6a3f8f3109697e9810cdd56ad04ceb1671f (patch) | |
tree | b57e6e584aeb13d578daecc3071c8c0ce09df1e5 /spec | |
parent | c4209bcc776b0af6bc697a069e08368d445dcc9e (diff) | |
parent | b9e573db5707a8921699a3035d73d5b621cbcdcd (diff) | |
download | gitlab-ce-fd31d6a3f8f3109697e9810cdd56ad04ceb1671f.tar.gz |
Merge branch 'dm-fix-ghost-user-validation' into 'master'
Skip validation when creating internal (ghost, service desk) users
See merge request !10949
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/user_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 0a2860f2505..0bcebc27598 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -1556,6 +1556,16 @@ describe User, models: true do expect(ghost.email).to eq('ghost1@example.com') end end + + context 'when a domain whitelist is in place' do + before do + stub_application_setting(domain_whitelist: ['gitlab.com']) + end + + it 'creates a ghost user' do + expect(User.ghost).to be_persisted + end + end end describe '#update_two_factor_requirement' do |