Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/auth/ldap/config_spec.rb')
-rw-r--r--spec/lib/gitlab/auth/ldap/config_spec.rb15
1 files changed, 14 insertions, 1 deletions
diff --git a/spec/lib/gitlab/auth/ldap/config_spec.rb b/spec/lib/gitlab/auth/ldap/config_spec.rb
index 160fd78b2b9..48039b58216 100644
--- a/spec/lib/gitlab/auth/ldap/config_spec.rb
+++ b/spec/lib/gitlab/auth/ldap/config_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Gitlab::Auth::Ldap::Config do
+RSpec.describe Gitlab::Auth::Ldap::Config, feature_category: :system_access do
include LdapHelpers
before do
@@ -362,6 +362,19 @@ AtlErSqafbECNDSwS5BX8yDpu5yRBJ4xegO/rNlmb8ICRYkuJapD1xXicFOsmfUK
expect(config.omniauth_options.keys).not_to include(:bind_dn, :password)
end
+ it 'defaults to plain encryption when not configured' do
+ stub_ldap_config(
+ options: {
+ 'host' => 'ldap.example.com',
+ 'port' => 386,
+ 'base' => 'ou=users,dc=example,dc=com',
+ 'uid' => 'uid'
+ }
+ )
+
+ expect(config.omniauth_options).to include(encryption: 'plain')
+ end
+
it 'includes authentication options when auth is configured' do
stub_ldap_config(
options: {