Work in progress, keeping avatars locally

This introduces a new model to store the avatars and 3 uploads per user (gravatar, system and custom)

user can then pick which they want.
This commit is contained in:
Sam
2014-05-22 17:37:02 +10:00
committed by Sam Saffron
parent 4ccf07be8c
commit 6c1c8be794
42 changed files with 626 additions and 319 deletions
@@ -1136,7 +1136,6 @@ describe UsersController do
upload = Fabricate(:upload)
Upload.expects(:create_for).returns(upload)
# enqueues the user_image generator job
Jobs.expects(:enqueue).with(:generate_avatars, { user_id: user.id, upload_id: upload.id })
xhr :post, :upload_user_image, username: user.username, file: user_image, user_image_type: "avatar"
user.reload
# erase the previous template
@@ -1194,7 +1193,6 @@ describe UsersController do
upload = Fabricate(:upload)
Upload.expects(:create_for).returns(upload)
# enqueues the user_image generator job
Jobs.expects(:enqueue).with(:generate_avatars, { user_id: user.id, upload_id: upload.id })
xhr :post, :upload_avatar, username: user.username, file: user_image_url, user_image_type: "avatar"
user.reload
# erase the previous template