diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-25 16:30:40 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-25 16:30:40 +0000 |
commit | b485c8c3723dc5aaba15ab9fa258010d1ec66d61 (patch) | |
tree | 36cd2260b2f31bc77ad313b644e5784160ce9104 /spec/lib | |
parent | 479d579719c36f1b8706165c20f4525bc32bb451 (diff) | |
download | gitlab-ce-b485c8c3723dc5aaba15ab9fa258010d1ec66d61.tar.gz |
Add latest changes from gitlab-org/security/gitlab@14-8-stable-ee
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/banzai/filter/math_filter_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/banzai/filter/math_filter_spec.rb b/spec/lib/banzai/filter/math_filter_spec.rb index 6d22fa3a001..128f8532d39 100644 --- a/spec/lib/banzai/filter/math_filter_spec.rb +++ b/spec/lib/banzai/filter/math_filter_spec.rb @@ -126,4 +126,12 @@ RSpec.describe Banzai::Filter::MathFilter do expect(before.to_s).to eq '$' expect(after.to_s).to eq '$' end + + it 'limits how many elements can be marked as math' do + stub_const('Banzai::Filter::MathFilter::RENDER_NODES_LIMIT', 2) + + doc = filter('$<code>2+2</code>$ + $<code>3+3</code>$ + $<code>4+4</code>$') + + expect(doc.search('.js-render-math').count).to eq(2) + end end |