Codebase list ruby-omniauth-facebook / df7f2ad
add test for image_url with versioning frausto 9 years ago
1 changed file(s) with 7 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
101101 raw_info = { 'name' => 'Fred Smith', 'id' => '321' }
102102 strategy.stubs(:raw_info).returns(raw_info)
103103 assert_equal 'https://graph.facebook.com/321/picture', strategy.info['image']
104 end
105
106 test 'returns the image_url based of the client site' do
107 @options = { :secure_image_url => true, :client_options => {:site => "https://blah.facebook.com/v2.2"}}
108 raw_info = { 'name' => 'Fred Smith', 'id' => '321' }
109 strategy.stubs(:raw_info).returns(raw_info)
110 assert_equal 'https://blah.facebook.com/v2.2/321/picture', strategy.info['image']
104111 end
105112
106113 test 'returns the image with size specified in the `image_size` option' do