Merge pull request #1395 from ZogStriP/fix-sh-convert-error-in-test

FIX: convert error in test
This commit is contained in:
Robin Ward 2013-08-28 13:23:36 -07:00
commit 28ff921ba2
1 changed files with 4 additions and 7 deletions

View File

@ -979,14 +979,11 @@ describe UsersController do
user.uploaded_avatar.id.should == upload.id user.uploaded_avatar.id.should == upload.id
# automatically set "use_uploaded_avatar" # automatically set "use_uploaded_avatar"
user.use_uploaded_avatar.should == true user.use_uploaded_avatar.should == true
end # returns the url, width and height of the uploaded image
it 'returns the url, width and height of the uploaded image' do
xhr :post, :upload_avatar, username: user.username, file: avatar
json = JSON.parse(response.body) json = JSON.parse(response.body)
json['url'].should_not be_nil json['url'].should == "/uploads/default/1/1234567890123456.jpg"
json['width'].should == 244 json['width'].should == 100
json['height'].should == 66 json['height'].should == 200
end end
end end