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
path: root/spec
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-02-03 14:37:53 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-02-03 14:37:53 +0300
commit468b5ccaf7a622e55549599ceb5b18220b5bf0aa (patch)
tree1f2e3e598938ee2398aa4968fc21717c1c93816c /spec
parenteb25ac12499d70f7ebd59b64857e6901a5c32972 (diff)
Add latest changes from gitlab-org/security/gitlab@14-7-stable-ee
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/banzai/filter/blockquote_fence_filter_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/lib/banzai/filter/blockquote_fence_filter_spec.rb b/spec/lib/banzai/filter/blockquote_fence_filter_spec.rb
index e736943914b..2d326bd77a6 100644
--- a/spec/lib/banzai/filter/blockquote_fence_filter_spec.rb
+++ b/spec/lib/banzai/filter/blockquote_fence_filter_spec.rb
@@ -17,4 +17,14 @@ RSpec.describe Banzai::Filter::BlockquoteFenceFilter do
it 'allows trailing whitespace on blockquote fence lines' do
expect(filter(">>> \ntest\n>>> ")).to eq("\n> test\n")
end
+
+ context 'when incomplete blockquote fences with multiple blocks are present' do
+ it 'does not raise timeout error' do
+ test_string = ">>>#{"\n```\nfoo\n```" * 20}"
+
+ expect do
+ Timeout.timeout(2.seconds) { filter(test_string) }
+ end.not_to raise_error
+ end
+ end
end