mirror of
https://github.com/discourse/discourse.git
synced 2025-06-13 01:46:29 +08:00
SPEC: improve the code readability
3840ace97820acf98cb8f58ab1cab96f66e2def2
This commit is contained in:
@ -230,15 +230,13 @@ RSpec.describe InlineUploads do
|
|||||||
|
|
||||||
it "should not correct non image URLs to the short url and paths" do
|
it "should not correct non image URLs to the short url and paths" do
|
||||||
SiteSetting.authorized_extensions = "mp4"
|
SiteSetting.authorized_extensions = "mp4"
|
||||||
upload4 = Fabricate(:video_upload)
|
upload = Fabricate(:video_upload)
|
||||||
|
|
||||||
md = <<~MD
|
md = <<~MD
|
||||||
#{GlobalSetting.cdn_url}#{upload4.url}
|
#{GlobalSetting.cdn_url}#{upload.url}
|
||||||
MD
|
MD
|
||||||
|
|
||||||
expect(InlineUploads.process(md)).to eq(<<~MD)
|
expect(InlineUploads.process(md)).to eq(md)
|
||||||
#{GlobalSetting.cdn_url}#{upload4.url}
|
|
||||||
MD
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it "should correct img tags with uppercase upload extension" do
|
it "should correct img tags with uppercase upload extension" do
|
||||||
|
Reference in New Issue
Block a user