diff options
author | Michael Kozono <mkozono@gmail.com> | 2017-08-18 01:05:56 +0300 |
---|---|---|
committer | Michael Kozono <mkozono@gmail.com> | 2017-08-18 02:00:07 +0300 |
commit | 1c3a2bc38987a659319314953a1a90263e329c3b (patch) | |
tree | c7f8a59bc2770d4d7df05afeb6f38856893a2b19 /spec/initializers/settings_spec.rb | |
parent | f3203cbbc25586df622552153cc460d2f79f414e (diff) |
Setup LDAP settings properly
Diffstat (limited to 'spec/initializers/settings_spec.rb')
-rw-r--r-- | spec/initializers/settings_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/initializers/settings_spec.rb b/spec/initializers/settings_spec.rb index e5ec90cb8f9..092e8c0381c 100644 --- a/spec/initializers/settings_spec.rb +++ b/spec/initializers/settings_spec.rb @@ -2,6 +2,22 @@ require 'spec_helper' require_relative '../../config/initializers/1_settings' describe Settings do + describe '#ldap' do + it 'can be accessed with dot syntax all the way down' do + expect(Gitlab.config.ldap.servers.main.label).to eq('ldap') + end + + # Specifically trying to cause this error discovered in EE when removing the + # reassignment of each server element with Settingslogic. + # + # `undefined method `label' for #<Hash:0x007fbd18b59c08>` + # + it 'can be accessed in a very specific way that breaks without reassigning each element with Settingslogic' do + server_settings = Gitlab.config.ldap.servers['main'] + expect(server_settings.label).to eq('ldap') + end + end + describe '#repositories' do it 'assigns the default failure attributes' do repository_settings = Gitlab.config.repositories.storages['broken'] |