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:
Diffstat (limited to 'spec/lib/banzai/pipeline/full_pipeline_spec.rb')
-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