summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-12-24 20:34:19 +0100
committerDouwe Maan <douwe@gitlab.com>2015-12-24 20:34:19 +0100
commit43a3a401bdffaab2baf87f6c68f9a34a33f5b36d (patch)
tree7c4ddd70328573b0b4aa02c309bba57aed2d1758 /spec
parent396c5c97ddbbe0744d9c27d855c22e2a57546ea1 (diff)
parente3befaed82f9aa52c79a1d4c437fe4fc63f8d07a (diff)
downloadgitlab-ce-43a3a401bdffaab2baf87f6c68f9a34a33f5b36d.tar.gz
Merge branch 'master' into mention-all
Diffstat (limited to 'spec')
-rw-r--r--spec/javascripts/new_branch_spec.js.coffee2
-rw-r--r--spec/lib/gitlab/ldap/user_spec.rb15
2 files changed, 16 insertions, 1 deletions
diff --git a/spec/javascripts/new_branch_spec.js.coffee b/spec/javascripts/new_branch_spec.js.coffee
index 8889ce2e9b3..f2ce85efcdc 100644
--- a/spec/javascripts/new_branch_spec.js.coffee
+++ b/spec/javascripts/new_branch_spec.js.coffee
@@ -1,4 +1,4 @@
-#= require jquery.ui.all
+#= require jquery-ui
#= require new_branch_form
describe 'Branch', ->
diff --git a/spec/lib/gitlab/ldap/user_spec.rb b/spec/lib/gitlab/ldap/user_spec.rb
index 3bba5e2efa2..1e755259dae 100644
--- a/spec/lib/gitlab/ldap/user_spec.rb
+++ b/spec/lib/gitlab/ldap/user_spec.rb
@@ -42,6 +42,21 @@ describe Gitlab::LDAP::User, lib: true do
end
end
+ describe '.find_by_uid_and_provider' do
+ it 'retrieves the correct user' do
+ special_info = {
+ name: 'John Åström',
+ email: 'john@example.com',
+ nickname: 'jastrom'
+ }
+ special_hash = OmniAuth::AuthHash.new(uid: 'CN=John Åström,CN=Users,DC=Example,DC=com', provider: 'ldapmain', info: special_info)
+ special_chars_user = described_class.new(special_hash)
+ user = special_chars_user.save
+
+ expect(described_class.find_by_uid_and_provider(special_hash.uid, special_hash.provider)).to eq user
+ end
+ end
+
describe :find_or_create do
it "finds the user if already existing" do
create(:omniauth_user, extern_uid: 'my-uid', provider: 'ldapmain')