FIX: Tests could get stucked in infinite loop if it fails to resolve IP of a hostname.

This commit is contained in:
Guo Xiang Tan
2018-03-28 14:44:42 +08:00
parent 03725c7c8a
commit ee69d58a59
3 changed files with 19 additions and 9 deletions

View File

@@ -46,6 +46,9 @@ describe UserAvatar do
describe 'when avatar url returns an invalid status code' do
it 'should not do anything' do
stub_request(:get, "http://thisfakesomething.something.com/")
.to_return(status: 500, body: "", headers: {})
url = "http://thisfakesomething.something.com/"
UserAvatar.import_url_for_user(url, user)