From 9d3eb09158ffd6401b9c46118d57cfa952beed6c Mon Sep 17 00:00:00 2001 From: Jan-Willem van der Meer Date: Wed, 3 Sep 2014 10:10:55 +0200 Subject: [PATCH] Move LDAP tests to proper location Same patch as gitlab-ce https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/1053 --- lib/gitlab/ldap/adapter.rb | 3 ++- spec/lib/{ => gitlab}/auth_spec.rb | 0 spec/lib/gitlab/ldap/{user_auth_spec.rb => user_spec.rb} | 2 +- spec/lib/{oauth_spec.rb => gitlab/oauth/user_spec.rb} | 0 4 files changed, 3 insertions(+), 2 deletions(-) rename spec/lib/{ => gitlab}/auth_spec.rb (100%) rename spec/lib/gitlab/ldap/{user_auth_spec.rb => user_spec.rb} (98%) rename spec/lib/{oauth_spec.rb => gitlab/oauth/user_spec.rb} (100%) diff --git a/lib/gitlab/ldap/adapter.rb b/lib/gitlab/ldap/adapter.rb index c4ecb99e7a..e6ab0cbfa2 100644 --- a/lib/gitlab/ldap/adapter.rb +++ b/lib/gitlab/ldap/adapter.rb @@ -110,7 +110,8 @@ module Gitlab end def dn_matches_filter?(dn, filter) - ldap_search(base: dn, filter: filter, scope: Net::LDAP::SearchScope_BaseObject, attributes: %w{dn}).any? + ldap_search(base: dn, filter: filter, + scope: Net::LDAP::SearchScope_BaseObject, attributes: %w{dn}).any? end def ldap_search(*args) diff --git a/spec/lib/auth_spec.rb b/spec/lib/gitlab/auth_spec.rb similarity index 100% rename from spec/lib/auth_spec.rb rename to spec/lib/gitlab/auth_spec.rb diff --git a/spec/lib/gitlab/ldap/user_auth_spec.rb b/spec/lib/gitlab/ldap/user_spec.rb similarity index 98% rename from spec/lib/gitlab/ldap/user_auth_spec.rb rename to spec/lib/gitlab/ldap/user_spec.rb index 501642dca7..71b316bee2 100644 --- a/spec/lib/gitlab/ldap/user_auth_spec.rb +++ b/spec/lib/gitlab/ldap/user_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe Gitlab::LDAP do +describe Gitlab::LDAP::User do let(:gl_auth) { Gitlab::LDAP::User } before do diff --git a/spec/lib/oauth_spec.rb b/spec/lib/gitlab/oauth/user_spec.rb similarity index 100% rename from spec/lib/oauth_spec.rb rename to spec/lib/gitlab/oauth/user_spec.rb