summaryrefslogtreecommitdiff
path: root/spec/lib/banzai/filter/inline_math_filter_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/banzai/filter/inline_math_filter_spec.rb')
-rw-r--r--spec/lib/banzai/filter/inline_math_filter_spec.rb45
1 files changed, 0 insertions, 45 deletions
diff --git a/spec/lib/banzai/filter/inline_math_filter_spec.rb b/spec/lib/banzai/filter/inline_math_filter_spec.rb
deleted file mode 100644
index 01d791f9ca1..00000000000
--- a/spec/lib/banzai/filter/inline_math_filter_spec.rb
+++ /dev/null
@@ -1,45 +0,0 @@
-require 'spec_helper'
-
-describe Banzai::Filter::InlineMathFilter, lib: true do
- include FilterSpecHelper
-
- it 'leaves regular inline code unchanged' do
- input = "<code>2+2</code>"
- doc = filter(input)
- expect(doc.to_s).to eq input
- end
-
- it 'removes surrounding dollar signs and adds class' do
- doc = filter("$<code>2+2</code>$")
- expect(doc.to_s).to eq '<code class="code math">2+2</code>'
- end
-
- it 'only removes surrounding dollar signs' do
- doc = filter("test $<code>2+2</code>$ test")
- expect(doc.to_s).to eq 'test <code class="code math">2+2</code> test'
- end
-
- it 'only removes surrounding single dollar sign' do
- doc = filter("test $$<code>2+2</code>$$ test")
- expect(doc.to_s).to eq 'test $<code class="code math">2+2</code>$ test'
- end
-
- it 'ignores cases with missing dolar sign at the end' do
- input = "test $<code>2+2</code> test"
- doc = filter(input)
- expect(doc.to_s).to eq input
- end
-
- it 'ignores cases with missing dolar sign at the beginning' do
- input = "test <code>2+2</code>$ test"
- doc = filter(input)
- expect(doc.to_s).to eq input
- end
-
- it 'ignores dollar signs if it is not adjacent' do
- input = '<p>We check strictly $<code>2+2</code> and <code>2+2</code>$ </p>'
- doc = filter(input)
- expect(doc.to_s).to eq input
- end
-
-end