From e15982a4760702286b012a7f8e92f431dfe60c8b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9gis=20Hanol?= <regis@hanol.fr>
Date: Wed, 28 Aug 2013 22:06:09 +0200
Subject: [PATCH] FIX: convert error in test

---
 spec/controllers/users_controller_spec.rb | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

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