SPEC: correctly skips invalid upload urls

788f995f30
This commit is contained in:
Vinoth Kannan 2019-06-11 20:15:40 +05:30
parent 788f995f30
commit 1881e895dc
1 changed files with 1 additions and 1 deletions

View File

@ -1347,7 +1347,7 @@ describe Post do
urls = []
upload1 = Fabricate(:upload)
upload2 = Fabricate(:upload)
post = Fabricate(:post, raw: "A post with image and link upload.\n\n![](#{upload1.short_url})\n\n<a href='#{upload2.url}'>Link to upload</a>")
post = Fabricate(:post, raw: "A post with image and link upload.\n\n![](#{upload1.short_url})\n\n<a href='#{upload2.url}'>Link to upload</a>\n![](http://example.com/external.png)")
post.each_upload_url { |src, _, _| urls << src }
expect(urls).to eq([upload1.url, upload2.url])
end