DEV: Refactor helper methods for upload markdown

Follow-up to a61ff167
This commit is contained in:
Gerhard Schlager
2019-07-25 16:34:46 +02:00
parent 2ba4de2d45
commit fd12c414e7
6 changed files with 43 additions and 39 deletions

View File

@ -376,10 +376,10 @@ describe Email::Sender do
fab!(:reply) do
raw = <<~RAW
Hello world!
#{DiscourseMarkdown.attachment_markdown(small_pdf)}
#{DiscourseMarkdown.attachment_markdown(large_pdf)}
#{DiscourseMarkdown.image_markdown(image)}
#{DiscourseMarkdown.attachment_markdown(csv_file)}
#{UploadMarkdown.new(small_pdf).attachment_markdown}
#{UploadMarkdown.new(large_pdf).attachment_markdown}
#{UploadMarkdown.new(image).image_markdown}
#{UploadMarkdown.new(csv_file).attachment_markdown}
RAW
reply = Fabricate(:post, raw: raw, topic: post.topic, user: Fabricate(:user))
reply.link_post_uploads