summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-02-03 11:37:53 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-02-03 11:37:53 +0000
commit468b5ccaf7a622e55549599ceb5b18220b5bf0aa (patch)
tree1f2e3e598938ee2398aa4968fc21717c1c93816c /spec/lib
parenteb25ac12499d70f7ebd59b64857e6901a5c32972 (diff)
downloadgitlab-ce-468b5ccaf7a622e55549599ceb5b18220b5bf0aa.tar.gz
Add latest changes from gitlab-org/security/gitlab@14-7-stable-ee
Diffstat (limited to 'spec/lib')
-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