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-02-04 20:42:58 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-02-04 20:42:58 +0300
commit7114ad8ea2418f8fdc4741c8b7f5b551bcc467a7 (patch)
tree589d36c0e93fddcea736dd6cb085a89252c6501a /spec/helpers
parent0b4b96be1f12bf2a0b9b561daba716e0468a9e61 (diff)
Add latest changes from gitlab-org/gitlab@13-8-stable-ee
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