diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-04-26 14:13:04 -0500 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-04-26 14:13:13 -0500 |
commit | b9e573db5707a8921699a3035d73d5b621cbcdcd (patch) | |
tree | 9d75d58851dfb53c13806391212b87c780aa1028 /spec | |
parent | d39b16d06d9e98fbd1898140341a0e08ee61edf3 (diff) | |
download | gitlab-ce-b9e573db5707a8921699a3035d73d5b621cbcdcd.tar.gz |
Skip validation when creating internal (ghost, service desk) usersdm-fix-ghost-user-validation
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 |