mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 14:07:30 +08:00
FIX: Don't raise an exception if a topic cannot be retrieved (#9906)
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user