Skip to content

Commit 657d436

Browse files
committed
Fix options fields
1 parent dfafa5e commit 657d436

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/omniauth/strategies/linkedin.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def access_token
6060
end
6161

6262
def raw_info
63-
@raw_info ||= access_token.get("/v1/people/~:(#{fields.join(',')})?format=json").parsed
63+
@raw_info ||= access_token.get("/v1/people/~:(#{options.fields.join(',')})?format=json").parsed
6464
end
6565

6666
private

spec/omniauth/strategies/linkedin_spec.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@
7777
before :each do
7878
access_token = double('access token')
7979
response = double('response', :parsed => { :foo => 'bar' })
80-
expect(access_token).to receive(:get).with("/v1/people/~:(baz,qux)?format=json").and_return(response)
80+
expect(access_token).to receive(:get)
81+
.with("/v1/people/~:(id,email-address,first-name,last-name,headline,location,industry,picture-url,public-profile-url)?format=json")
82+
.and_return(response)
8183

8284
allow(subject).to receive(:access_token) { access_token }
8385
end

0 commit comments

Comments
 (0)