FEATURE: ability to regenerate system avatars as needed

BUGFIX: made system letter avatar more thinner for less block look
This commit is contained in:
Sam
2014-05-28 11:50:49 +10:00
parent b1d5f4440b
commit 2791852bd8
6 changed files with 73 additions and 10 deletions

View File

@@ -11,6 +11,17 @@ describe UserAvatar do
avatar.system_upload.should_not be_nil
end
it 'corrects old system avatars on refresh' do
upload = Fabricate(:upload)
user = Fabricate(:user, uploaded_avatar_id: upload.id)
avatar = UserAvatar.create!(user_id: user.id, system_upload_id: upload.id)
avatar.update_system_avatar!
user.reload
user.uploaded_avatar_id.should_not == upload.id
avatar.system_upload_id.should == user.uploaded_avatar_id
end
it 'can update gravatars' do
temp = Tempfile.new('test')
temp.binmode