Codebase list ruby-omniauth-facebook / 2990f06
Add verified key to the info Hash Ryan Sobol 12 years ago
2 changed file(s) with 16 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
4040 'Facebook' => raw_info['link'],
4141 'Website' => raw_info['website']
4242 },
43 'location' => (raw_info['location'] || {})['name']
43 'location' => (raw_info['location'] || {})['name'],
44 'verified' => raw_info['verified']
4445 })
4546 end
4647
144144 it 'has no urls' do
145145 subject.info.should_not have_key('urls')
146146 end
147
148 it 'has no verified key' do
149 subject.info.should_not have_key('verified')
150 end
147151 end
148152
149153 context 'when data is present in raw info' do
204208 subject.info['urls'].should be_a(Hash)
205209 subject.info['urls']['Facebook'].should eq('http://www.facebook.com/fredsmith')
206210 subject.info['urls']['Website'].should eq('https://my-wonderful-site.com')
211 end
212
213 it 'returns the positive verified status' do
214 @raw_info['verified'] = true
215 subject.info['verified'].should be_true
216 end
217
218 it 'returns the negative verified status' do
219 @raw_info['verified'] = false
220 subject.info['verified'].should be_false
207221 end
208222 end
209223 end