summaryrefslogtreecommitdiff
path: root/spec/initializers
diff options
context:
space:
mode:
authorMichael Kozono <mkozono@gmail.com>2017-08-17 15:05:56 -0700
committerMichael Kozono <mkozono@gmail.com>2017-08-17 16:00:07 -0700
commit1c3a2bc38987a659319314953a1a90263e329c3b (patch)
treec7f8a59bc2770d4d7df05afeb6f38856893a2b19 /spec/initializers
parentf3203cbbc25586df622552153cc460d2f79f414e (diff)
downloadgitlab-ce-1c3a2bc38987a659319314953a1a90263e329c3b.tar.gz
Setup LDAP settings properly
Diffstat (limited to 'spec/initializers')
-rw-r--r--spec/initializers/settings_spec.rb16
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']