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.rb16
1 files changed, 7 insertions, 9 deletions
diff --git a/spec/lib/banzai/pipeline/full_pipeline_spec.rb b/spec/lib/banzai/pipeline/full_pipeline_spec.rb
index c07f99dc9fc..1a0f5a53a23 100644
--- a/spec/lib/banzai/pipeline/full_pipeline_spec.rb
+++ b/spec/lib/banzai/pipeline/full_pipeline_spec.rb
@@ -168,15 +168,13 @@ RSpec.describe Banzai::Pipeline::FullPipeline do
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)
+ describe 'cmark-gfm and autlolinks' do
+ it 'does not hang with significant number of unclosed image links' do
+ markdown = '![a ' * 300000
+
+ expect do
+ Timeout.timeout(2.seconds) { described_class.to_html(markdown, project: nil) }
+ end.not_to raise_error
end
end
end