diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-26 03:14:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-26 03:14:54 +0300 |
commit | a40d39ddd2dce862f95d35c42a07c0fce4df8f0a (patch) | |
tree | 4c7f8b0898c57f1e0973b22729e01f8508388562 /spec/lib/banzai | |
parent | ffe8b982e9d93ed23817a4bd9696ef1ef59de9f9 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/banzai')
-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 |