profile.image_url is set to :thumb_large in update_profile
This commit is contained in:
parent
68a51448e5
commit
f861955d80
2 changed files with 2 additions and 2 deletions
|
|
@ -304,7 +304,7 @@ class User
|
||||||
def update_profile(params)
|
def update_profile(params)
|
||||||
if params[:photo]
|
if params[:photo]
|
||||||
params[:photo].update_attributes(:pending => false) if params[:photo].pending
|
params[:photo].update_attributes(:pending => false) if params[:photo].pending
|
||||||
params[:image_url] = params[:photo].url
|
params[:image_url] = params[:photo].url(:thumb_large)
|
||||||
params[:image_url_medium] = params[:photo].url(:thumb_medium)
|
params[:image_url_medium] = params[:photo].url(:thumb_medium)
|
||||||
params[:image_url_small] = params[:photo].url(:thumb_small)
|
params[:image_url_small] = params[:photo].url(:thumb_small)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -296,7 +296,7 @@ describe User do
|
||||||
end
|
end
|
||||||
it 'updates image_url' do
|
it 'updates image_url' do
|
||||||
user.update_profile(@params).should be_true
|
user.update_profile(@params).should be_true
|
||||||
user.reload.profile.image_url.should == @photo.absolute_url
|
user.reload.profile.image_url.should == @photo.absolute_url(:thumb_large)
|
||||||
user.profile.image_url_medium.should == @photo.absolute_url(:thumb_medium)
|
user.profile.image_url_medium.should == @photo.absolute_url(:thumb_medium)
|
||||||
user.profile.image_url_small.should == @photo.absolute_url(:thumb_small)
|
user.profile.image_url_small.should == @photo.absolute_url(:thumb_small)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue