More tests
This commit is contained in:
parent
7f829f52e1
commit
2bfed70a0b
1 changed files with 11 additions and 1 deletions
|
@ -23,9 +23,19 @@ describe Banzai::Filter::InlineMathFilter, lib: true do
|
|||
expect(doc.to_s).to eq 'test $<code class="code math">2+2</code>$ test'
|
||||
end
|
||||
|
||||
it 'ignores cases with missing dolar sign' do
|
||||
it 'ignores cases with missing dolar sign at the end' do
|
||||
doc = filter("test $<code>2+2</code> test")
|
||||
expect(doc.to_s).to eq 'test $<code>2+2</code> test'
|
||||
end
|
||||
|
||||
it 'ignores cases with missing dolar sign at the beginning' do
|
||||
doc = filter("test <code>2+2</code>$ test")
|
||||
expect(doc.to_s).to eq 'test <code>2+2</code>$ test'
|
||||
end
|
||||
|
||||
it 'ignores dollar signs if it is not adjacent' do
|
||||
doc = filter("$test <code>2+2</code>$ test")
|
||||
expect(doc.to_s).to eq '$test <code>2+2</code>$ test'
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue