'<pre lang="plantuml"><code>Bob -> Sara : Hello</code></pre>'
else
'<pre><code lang="plantuml">Bob -> Sara : Hello</code></pre>'
end
output='<div class="listingblock"><div class="content"><pre class="plantuml plantuml-error"> Error: cannot connect to PlantUML server at "invalid"</pre></div></div>'
doc=filter(input)
expect(doc.to_s).toeqoutput
end
end
it'does not replace plantuml pre tag with img tag if disabled'do
stub_application_setting(plantuml_enabled: false)
input='<pre><code lang="plantuml">Bob -> Sara : Hello</code></pre>'
output='<pre><code lang="plantuml">Bob -> Sara : Hello</code></pre>'
doc=filter(input)
context'using ruby-based HTML renderer'do
beforedo
stub_feature_flags(use_cmark_renderer: false)
end
expect(doc.to_s).toeqoutput
it_behaves_like'renders correct markdown'
end
it'does not replace plantuml pre tag with img tag if url is invalid'do
input='<pre><code lang="plantuml">Bob -> Sara : Hello</code></pre>'
output='<div class="listingblock"><div class="content"><pre class="plantuml plantuml-error"> Error: cannot connect to PlantUML server at "invalid"</pre></div></div>'