mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
cleanup so gravatar download failures are consistent
previously we would ignore socket error, but this would mean that there could be conditions where we would keep trying to download gravatars forever (in an hourly job)
This commit is contained in:
@@ -74,7 +74,9 @@ describe UserAvatar do
|
||||
|
||||
FileHelper.expects(:download).raises(SocketError)
|
||||
|
||||
expect { avatar.update_gravatar! }.to_not change { Upload.count }
|
||||
expect do
|
||||
expect { avatar.update_gravatar! }.to raise_error(SocketError)
|
||||
end.to_not change { Upload.count }
|
||||
|
||||
expect(avatar.last_gravatar_download_attempt).to eq(Time.now)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user