mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
move profile_background from User to UserProfile
This commit is contained in:

committed by
Robin Ward

parent
00910679ad
commit
386d1e231a
@ -1169,7 +1169,7 @@ describe UsersController do
|
||||
xhr :post, :upload_user_image, username: user.username, file: user_image, user_image_type: "profile_background"
|
||||
user.reload
|
||||
|
||||
user.profile_background.should == "/uploads/default/1/1234567890123456.png"
|
||||
user.user_profile.profile_background.should == "/uploads/default/1/1234567890123456.png"
|
||||
|
||||
# returns the url, width and height of the uploaded image
|
||||
json = JSON.parse(response.body)
|
||||
@ -1218,7 +1218,7 @@ describe UsersController do
|
||||
Upload.expects(:create_for).returns(upload)
|
||||
xhr :post, :upload_user_image, username: user.username, file: user_image_url, user_image_type: "profile_background"
|
||||
user.reload
|
||||
user.profile_background.should == "/uploads/default/1/1234567890123456.png"
|
||||
user.user_profile.profile_background.should == "/uploads/default/1/1234567890123456.png"
|
||||
|
||||
# returns the url, width and height of the uploaded image
|
||||
json = JSON.parse(response.body)
|
||||
@ -1287,7 +1287,7 @@ describe UsersController do
|
||||
|
||||
it 'it successful' do
|
||||
xhr :put, :clear_profile_background, username: user.username
|
||||
user.reload.profile_background.should == ""
|
||||
user.reload.user_profile.profile_background.should == ""
|
||||
response.should be_success
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user