diff --git a/lib/omniauth/strategies/facebook.rb b/lib/omniauth/strategies/facebook.rb index 1137dd7..a3f183c 100644 --- a/lib/omniauth/strategies/facebook.rb +++ b/lib/omniauth/strategies/facebook.rb @@ -41,7 +41,8 @@ module OmniAuth 'Facebook' => raw_info['link'], 'Website' => raw_info['website'] }, - 'location' => (raw_info['location'] || {})['name'] + 'location' => (raw_info['location'] || {})['name'], + 'verified' => raw_info['verified'] }) end diff --git a/spec/omniauth/strategies/facebook_spec.rb b/spec/omniauth/strategies/facebook_spec.rb index 57d4453..67010ba 100644 --- a/spec/omniauth/strategies/facebook_spec.rb +++ b/spec/omniauth/strategies/facebook_spec.rb @@ -145,6 +145,10 @@ describe OmniAuth::Strategies::Facebook do it 'has no urls' do subject.info.should_not have_key('urls') end + + it 'has no verified key' do + subject.info.should_not have_key('verified') + end end context 'when data is present in raw info' do @@ -206,6 +210,16 @@ describe OmniAuth::Strategies::Facebook do subject.info['urls']['Facebook'].should eq('http://www.facebook.com/fredsmith') subject.info['urls']['Website'].should eq('https://my-wonderful-site.com') end + + it 'returns the positive verified status' do + @raw_info['verified'] = true + subject.info['verified'].should be_true + end + + it 'returns the negative verified status' do + @raw_info['verified'] = false + subject.info['verified'].should be_false + end end end