Skip to content
Snippets Groups Projects
Commit 6159ec56 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Merge branch 'issue-broken-twitter-signup' into 'master'

Ensure Oath supports providers without email response

See merge request !1054
parents 4102eb3b 6143cef4
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -73,6 +73,7 @@ module Gitlab
end
 
def email
return unless auth.info.respond_to?(:email)
auth.info.email.downcase unless auth.info.email.nil?
end
 
Loading
Loading
Loading
Loading
@@ -41,5 +41,17 @@ describe Gitlab::OAuth::User do
user.projects_limit.should == Gitlab.config.gitlab.default_projects_limit
user.can_create_group.should == Gitlab.config.gitlab.default_can_create_group
end
it "Set a temp email address if not provided (like twitter does)" do
info = double(
uid: 'my-uid',
nickname: 'john',
name: 'John'
)
auth = double(info: info, provider: 'my-provider')
user = gl_auth.create(auth)
expect(user.email).to_not be_empty
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment