summaryrefslogtreecommitdiff
path: root/spec/lib/banzai/pipeline
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-08-26 14:37:09 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-08-26 14:37:20 +0000
commit25ed7b6ae4712518e96d4719b75dd293c57404a2 (patch)
tree102e02b15909f27a82b6cf64e7b878f0b201b383 /spec/lib/banzai/pipeline
parentdaf5ae5bd439f1f32363d410129d5b9e73fbb539 (diff)
downloadgitlab-ce-25ed7b6ae4712518e96d4719b75dd293c57404a2.tar.gz
Add latest changes from gitlab-org/security/gitlab@15-3-stable-ee
Diffstat (limited to 'spec/lib/banzai/pipeline')
-rw-r--r--spec/lib/banzai/pipeline/full_pipeline_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/lib/banzai/pipeline/full_pipeline_spec.rb b/spec/lib/banzai/pipeline/full_pipeline_spec.rb
index 376edfb99fc..c07f99dc9fc 100644
--- a/spec/lib/banzai/pipeline/full_pipeline_spec.rb
+++ b/spec/lib/banzai/pipeline/full_pipeline_spec.rb
@@ -167,4 +167,16 @@ RSpec.describe Banzai::Pipeline::FullPipeline do
expect(output).to include('<em>@test_</em>')
end
end
+
+ describe 'unclosed image links' do
+ it 'detects a significat number of unclosed image links' do
+ markdown = '![a ' * 30
+ msg = <<~TEXT
+ Unable to render markdown - too many unclosed markdown image links detected.
+ TEXT
+ output = described_class.to_html(markdown, project: nil)
+
+ expect(output).to include(msg.strip)
+ end
+ end
end