fix specs

This commit is contained in:
Sam 2017-07-18 14:40:05 -04:00
parent f84e82f324
commit 1140e0a435
1 changed files with 4 additions and 5 deletions

View File

@ -4,13 +4,12 @@ describe PrettyText do
context 'markdown it' do context 'markdown it' do
before do before do
SiteSetting.enable_experimental_markdown_it = true
SiteSetting.discourse_math_enabled = true SiteSetting.discourse_math_enabled = true
end end
it 'can handle inline math' do it 'can handle inline math' do
cooked = PrettyText.cook('I like $\{a,b\}\$<a>$ etc..') cooked = PrettyText.cook('I like $\{a,b\}\$<a>$ etc')
html = '<p>I like <span class="math">\{a,b\}\$&lt;a&gt;</span> etc..</p>' html = '<p>I like <span class="math">\{a,b\}\$&lt;a&gt;</span> etc</p>'
expect(cooked).to eq(html) expect(cooked).to eq(html)
end end
@ -46,7 +45,7 @@ describe PrettyText do
$$ $$
\{a,b\}\$<a> \{a,b\}\$<a>
$$ $$
etc.. etc
MD MD
html = <<~HTML html = <<~HTML
@ -54,7 +53,7 @@ describe PrettyText do
<div class="math"> <div class="math">
{a,b}$&lt;a&gt; {a,b}$&lt;a&gt;
</div> </div>
<p>etc..</p> <p>etc</p>
HTML HTML
expect(cooked).to eq(html.strip) expect(cooked).to eq(html.strip)