Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add secure_image_url and image_size spec.

  • Loading branch information...
commit 266a00a7f1984e77bb61b9649ae655299748b5b2 1 parent e8c3e29
@guilhermesimoes guilhermesimoes authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 spec/omniauth/strategies/twitter_spec.rb
View
8 spec/omniauth/strategies/twitter_spec.rb
@@ -30,6 +30,14 @@
expect(subject.info[:image]).to eq('http://twimg0-a.akamaihd.net/sticky/default_profile_images/default_profile_0.png')
end
+ it 'should return secure image with size specified' do
+ @options = { :secure_image_url => 'true', :image_size => 'mini' }
+ subject.stub(:raw_info).and_return(
+ { 'profile_image_url_https' => 'https://twimg0-a.akamaihd.net/sticky/default_profile_images/default_profile_0_normal.png' }
+ )
+ expect(subject.info[:image]).to eq('https://twimg0-a.akamaihd.net/sticky/default_profile_images/default_profile_0_mini.png')
+ end
+
it 'should return normal image by default' do
subject.stub(:raw_info).and_return(
{ 'profile_image_url' => 'http://twimg0-a.akamaihd.net/sticky/default_profile_images/default_profile_0_normal.png' }
Please sign in to comment.
Something went wrong with that request. Please try again.