summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/ldap/adapter_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/ldap/adapter_spec.rb')
-rw-r--r--spec/lib/gitlab/ldap/adapter_spec.rb31
1 files changed, 0 insertions, 31 deletions
diff --git a/spec/lib/gitlab/ldap/adapter_spec.rb b/spec/lib/gitlab/ldap/adapter_spec.rb
deleted file mode 100644
index b609e4b38f2..00000000000
--- a/spec/lib/gitlab/ldap/adapter_spec.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-require 'spec_helper'
-
-describe Gitlab::LDAP::Adapter do
- let(:adapter) { Gitlab::LDAP::Adapter.new 'ldapmain' }
-
- describe :dn_matches_filter? do
- let(:ldap) { double(:ldap) }
- subject { adapter.dn_matches_filter?(:dn, :filter) }
- before { adapter.stub(ldap: ldap) }
-
- context "when the search is successful" do
- context "and the result is non-empty" do
- before { ldap.stub(search: [:foo]) }
-
- it { is_expected.to be_truthy }
- end
-
- context "and the result is empty" do
- before { ldap.stub(search: []) }
-
- it { is_expected.to be_falsey }
- end
- end
-
- context "when the search encounters an error" do
- before { ldap.stub(search: nil, get_operation_result: double(code: 1, message: 'some error')) }
-
- it { is_expected.to be_falsey }
- end
- end
-end