FIX: avatar was attached to the user who uploaded it...

This commit is contained in:
Régis Hanol
2013-10-12 10:55:41 +02:00
parent d55dc3dd99
commit 23bf4436f5
3 changed files with 12 additions and 5 deletions

View File

@ -970,7 +970,7 @@ describe UsersController do
upload = Fabricate(:upload)
Upload.expects(:create_for).returns(upload)
# enqueues the avatar generator job
Jobs.expects(:enqueue).with(:generate_avatars, { upload_id: upload.id })
Jobs.expects(:enqueue).with(:generate_avatars, { user_id: user.id, upload_id: upload.id })
xhr :post, :upload_avatar, username: user.username, file: avatar
user.reload
# erase the previous template