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')
-rw-r--r--spec/lib/banzai/pipeline/full_pipeline_spec.rb16
-rw-r--r--spec/lib/banzai/pipeline/gfm_pipeline_spec.rb2
2 files changed, 8 insertions, 10 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
diff --git a/spec/lib/banzai/pipeline/gfm_pipeline_spec.rb b/spec/lib/banzai/pipeline/gfm_pipeline_spec.rb
index e24177a7043..f67f13b3862 100644
--- a/spec/lib/banzai/pipeline/gfm_pipeline_spec.rb
+++ b/spec/lib/banzai/pipeline/gfm_pipeline_spec.rb
@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec.describe Banzai::Pipeline::GfmPipeline do
describe 'integration between parsing regular and external issue references' do
- let(:project) { create(:redmine_project, :public) }
+ let(:project) { create(:project, :with_redmine_integration, :public) }
context 'when internal issue tracker is enabled' do
context 'when shorthand pattern #ISSUE_ID is used' do