FIX: Don't raise an exception if a topic cannot be retrieved (#9906)

This commit is contained in:
Roman Rizzi
2020-05-28 11:59:20 -03:00
committed by GitHub
parent 0e9a380b13
commit a41476800b
2 changed files with 4 additions and 3 deletions

View File

@ -311,9 +311,10 @@ describe TopicEmbed do
end
context "non-http URL" do
let(:url) { '/test.txt' }
it "throws an error" do
expect { TopicEmbed.find_remote(url) }.to raise_error(URI::InvalidURIError)
url = '/test.txt'
expect(TopicEmbed.find_remote(url)).to be_nil
end
end