diff options
author | Michael Kozono <mkozono@gmail.com> | 2017-10-05 03:47:48 -0700 |
---|---|---|
committer | Michael Kozono <mkozono@gmail.com> | 2017-10-07 10:28:13 -0700 |
commit | 8c29a04549d4a956508ef9a92a043a309978fa34 (patch) | |
tree | 419a20b968d1a8e458955e6a68c3cfc6c1201d47 /spec/lib/gitlab/ldap/person_spec.rb | |
parent | 1d1ad7e0b68039100029f20a84fd867fe92cbb32 (diff) | |
download | gitlab-ce-8c29a04549d4a956508ef9a92a043a309978fa34.tar.gz |
Leave bad DNs alone instead of raising errors
Diffstat (limited to 'spec/lib/gitlab/ldap/person_spec.rb')
-rw-r--r-- | spec/lib/gitlab/ldap/person_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/lib/gitlab/ldap/person_spec.rb b/spec/lib/gitlab/ldap/person_spec.rb index 743b3fbde2b..d204050ef66 100644 --- a/spec/lib/gitlab/ldap/person_spec.rb +++ b/spec/lib/gitlab/ldap/person_spec.rb @@ -16,6 +16,20 @@ describe Gitlab::LDAP::Person do ) end + describe '.normalize_dn' do + subject { described_class.normalize_dn(given) } + + it_behaves_like 'normalizes a DN' + + context 'with an exception during normalization' do + let(:given) { 'John "Smith,' } # just something that will cause an exception + + it 'returns the given DN unmodified' do + expect(subject).to eq(given) + end + end + end + describe '.normalize_uid' do subject { described_class.normalize_uid(given) } |