Add verified key to the info Hash
Ryan Sobol
12 years ago
40 | 40 |
'Facebook' => raw_info['link'],
|
41 | 41 |
'Website' => raw_info['website']
|
42 | 42 |
},
|
43 | |
'location' => (raw_info['location'] || {})['name']
|
|
43 |
'location' => (raw_info['location'] || {})['name'],
|
|
44 |
'verified' => raw_info['verified']
|
44 | 45 |
})
|
45 | 46 |
end
|
46 | 47 |
|
144 | 144 |
it 'has no urls' do
|
145 | 145 |
subject.info.should_not have_key('urls')
|
146 | 146 |
end
|
|
147 |
|
|
148 |
it 'has no verified key' do
|
|
149 |
subject.info.should_not have_key('verified')
|
|
150 |
end
|
147 | 151 |
end
|
148 | 152 |
|
149 | 153 |
context 'when data is present in raw info' do
|
|
204 | 208 |
subject.info['urls'].should be_a(Hash)
|
205 | 209 |
subject.info['urls']['Facebook'].should eq('http://www.facebook.com/fredsmith')
|
206 | 210 |
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
|
207 | 221 |
end
|
208 | 222 |
end
|
209 | 223 |
end
|