profile.image_url is set to :thumb_large in update_profile

This commit is contained in:
Raphael 2010-12-13 12:11:54 -08:00
parent 68a51448e5
commit f861955d80
2 changed files with 2 additions and 2 deletions

View file

@ -304,7 +304,7 @@ class User
def update_profile(params)
if params[:photo]
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_small] = params[:photo].url(:thumb_small)
end

View file

@ -296,7 +296,7 @@ describe User do
end
it 'updates image_url' do
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_small.should == @photo.absolute_url(:thumb_small)
end