blob: f6474c8936d6772df62fec44a4107cecd8fa39ff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
require 'spec_helper'
describe Banzai::Filter::MermaidFilter do
include FilterSpecHelper
it 'adds `js-render-mermaid` class to the `code` tag' do
doc = filter("<pre class='code highlight js-syntax-highlight mermaid' lang='mermaid' v-pre='true'><code>graph TD;\n A-->B;\n</code></pre>")
result = doc.css('code').first
expect(result[:class]).to include('js-render-mermaid')
end
end
|