Skip to content
Snippets Groups Projects
Commit 11906663 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Fix regression in GuideToc tests.

parent ec0fc599
No related branches found
No related tags found
No related merge requests found
......@@ -72,12 +72,19 @@ describe JsDuck::GuideToc do
EOHTML
end
it "ignores HTML in headings" do
inject(<<-EOHTML).should =~ /<h2 id='myguide-section-my-chapter'>My Chapter/
it "keeps HTML in headings" do
inject(<<-EOHTML).should =~ /<h2 id='myguide-section-my-chapter'>My <span>Chapter<\/span>/
<h2>My <span>Chapter</span></h2>
EOHTML
end
it "strips HTML from TOC entries" do
inject(<<-EOHTML).should =~ /<a href='#!\/guide\/myguide-section-my-chapter-1'>My Chapter/
<h2>My <span>Chapter</span> 1</h2>
<h2>My <span>Chapter</span> 2</h2>
EOHTML
end
it "adds ID-s also all H* headings" do
inject(<<-EOHTML).should =~ /<h5 id='myguide-section-my-chapter'>My Chapter/
<h5>My Chapter</h5>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment