Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-01-27 15:09:01 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-01-27 15:09:01 +0300
commit507c0e71cd73201beadf9c5e1e0361fc8e9e2665 (patch)
tree2f9896faffe068d93d1789a72c5ed81954c791c4 /spec/helpers
parent6e7dc3f9d6b95200abd1fcd5cc418a9ae9803e4c (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/helpers')
-rw-r--r--spec/helpers/markup_helper_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/helpers/markup_helper_spec.rb b/spec/helpers/markup_helper_spec.rb
index 45e8a2e7e1a..3d1690f6588 100644
--- a/spec/helpers/markup_helper_spec.rb
+++ b/spec/helpers/markup_helper_spec.rb
@@ -355,6 +355,21 @@ RSpec.describe MarkupHelper do
expect(doc.css('.gl-label-link')).not_to be_empty
end
end
+
+ context 'when content has uploads' do
+ let(:upload_link) { '/uploads/test.png' }
+ let(:content) { "![ImageTest](#{upload_link})" }
+
+ before do
+ allow(wiki).to receive(:wiki_base_path).and_return(project.wiki.wiki_base_path)
+ end
+
+ it 'renders uploads relative to project' do
+ result = helper.render_wiki_content(wiki)
+
+ expect(result).to include("#{project.full_path}#{upload_link}")
+ end
+ end
end
context 'when file is Asciidoc' do