mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Handle invalid URLs gracefully when pulling hotlinked images
This commit is contained in:
@@ -222,6 +222,16 @@ describe Jobs::PullHotlinkedImages do
|
||||
MD
|
||||
end
|
||||
|
||||
it 'works when invalid url in post' do
|
||||
post = Fabricate(:post, raw: <<~MD)
|
||||

|
||||

|
||||
MD
|
||||
|
||||
expect { Jobs::PullHotlinkedImages.new.execute(post_id: post.id) }
|
||||
.to change { Upload.count }.by(1)
|
||||
end
|
||||
|
||||
it 'replaces bbcode images' do
|
||||
post = Fabricate(:post, raw: <<~MD)
|
||||
[img]
|
||||
|
||||
Reference in New Issue
Block a user