249 | 249 |
strategy.stubs(:appsecret_proof).returns(@appsecret_proof)
|
250 | 250 |
strategy.stubs(:access_token).returns(@access_token)
|
251 | 251 |
params = {:params => @options}
|
252 | |
@access_token.expects(:get).with('/me', params).returns(stub_everything('OAuth2::Response'))
|
|
252 |
@access_token.expects(:get).with('me', params).returns(stub_everything('OAuth2::Response'))
|
253 | 253 |
strategy.raw_info
|
254 | 254 |
end
|
255 | 255 |
|
|
258 | 258 |
strategy.stubs(:access_token).returns(@access_token)
|
259 | 259 |
strategy.stubs(:appsecret_proof).returns(@appsecret_proof)
|
260 | 260 |
params = {:params => @options}
|
261 | |
@access_token.expects(:get).with('/me', params).returns(stub_everything('OAuth2::Response'))
|
|
261 |
@access_token.expects(:get).with('me', params).returns(stub_everything('OAuth2::Response'))
|
262 | 262 |
strategy.raw_info
|
263 | 263 |
end
|
264 | 264 |
|
|
267 | 267 |
strategy.stubs(:access_token).returns(@access_token)
|
268 | 268 |
strategy.stubs(:appsecret_proof).returns(@appsecret_proof)
|
269 | 269 |
params = {:params => {:appsecret_proof => @appsecret_proof, :fields => 'about'}}
|
270 | |
@access_token.expects(:get).with('/me', params).returns(stub_everything('OAuth2::Response'))
|
|
270 |
@access_token.expects(:get).with('me', params).returns(stub_everything('OAuth2::Response'))
|
271 | 271 |
strategy.raw_info
|
272 | 272 |
end
|
273 | 273 |
|
|
280 | 280 |
raw_response.stubs(:headers).returns({'Content-Type' => 'application/json' })
|
281 | 281 |
oauth2_response = OAuth2::Response.new(raw_response)
|
282 | 282 |
params = {:params => @options}
|
283 | |
@access_token.stubs(:get).with('/me', params).returns(oauth2_response)
|
|
283 |
@access_token.stubs(:get).with('me', params).returns(oauth2_response)
|
284 | 284 |
assert_kind_of Hash, strategy.raw_info
|
285 | 285 |
assert_equal 'thar', strategy.raw_info['ohai']
|
286 | 286 |
end
|
|
290 | 290 |
strategy.stubs(:appsecret_proof).returns(@appsecret_proof)
|
291 | 291 |
oauth2_response = stub('OAuth2::Response', :parsed => false)
|
292 | 292 |
params = {:params => @options}
|
293 | |
@access_token.stubs(:get).with('/me', params).returns(oauth2_response)
|
|
293 |
@access_token.stubs(:get).with('me', params).returns(oauth2_response)
|
294 | 294 |
assert_kind_of Hash, strategy.raw_info
|
295 | 295 |
assert_equal({}, strategy.raw_info)
|
296 | 296 |
end
|