Skip to content

Commit

Permalink
Merge pull request #17 from niftyn8/gender
Browse files Browse the repository at this point in the history
Include gender in info
  • Loading branch information
jjbohn committed May 1, 2014
2 parents 0f1842b + 95c6b4e commit 88ba033
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/omniauth/strategies/openid_connect.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class OpenIDConnect
nickname: user_info.preferred_username,
first_name: user_info.given_name,
last_name: user_info.family_name,
gender: user_info.gender,
image: user_info.picture,
phone: user_info.phone_number,
urls: { website: user_info.website }
Expand Down
1 change: 1 addition & 0 deletions test/lib/omniauth/strategies/openid_connect_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def test_info
assert_equal user_info.preferred_username, info[:nickname]
assert_equal user_info.given_name, info[:first_name]
assert_equal user_info.family_name, info[:last_name]
assert_equal user_info.gender, info[:gender]
assert_equal user_info.picture, info[:image]
assert_equal user_info.phone_number, info[:phone]
assert_equal({ website: user_info.website }, info[:urls])
Expand Down
1 change: 1 addition & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def user_info
preferred_username: Faker::Internet.user_name,
given_name: Faker::Name.first_name,
family_name: Faker::Name.last_name,
gender: 'female',
picture: Faker::Internet.url + ".png",
phone_number: Faker::PhoneNumber.phone_number,
website: Faker::Internet.url,
Expand Down

0 comments on commit 88ba033

Please sign in to comment.