Skip to content
Snippets Groups Projects
Commit e34c5a35 authored by unarist's avatar unarist Committed by Eugen Rochko
Browse files

Fix 500 errors on searching invalid URLs (#3613)

parent 004672aa
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@ class FetchRemoteResourceService < BaseService
def call(url)
@url = url
process_url unless atom_url.nil?
process_url unless fetched_atom_feed.nil?
end
private
......
......@@ -10,7 +10,7 @@ describe FetchRemoteResourceService do
url = 'http://example.com/missing-atom'
service = double
allow(FetchAtomService).to receive(:new).and_return service
allow(service).to receive(:call).with(url).and_return([nil, 'body'])
allow(service).to receive(:call).with(url).and_return(nil)
result = subject.call(url)
expect(result).to be_nil
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment