Commit 11906663 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Fix regression in GuideToc tests.

parent ec0fc599
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -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>