blob: 395a6a0bee5ff598763bf9ff3e3d89368d0b9b42 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Banzai::Filter::MermaidFilter, feature_category: :team_planning do
include FilterSpecHelper
it 'adds `js-render-mermaid` class to the `code` tag' do
doc = filter("<pre class='code highlight js-syntax-highlight mermaid' data-canonical-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
|