summaryrefslogtreecommitdiffstats
path: root/test/unit/helpers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-11-06 18:52:07 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-11-06 18:52:07 +0000
commit7f9d2b080416132e0357bf3b95f6fa60082ba10b (patch)
tree0ded3e536a5361106df0f0af8e619b2be45b6e63 /test/unit/helpers
parent024ff96ee27aa7e61ceec25a351f6800461d5cf3 (diff)
downloadredmine-7f9d2b080416132e0357bf3b95f6fa60082ba10b.tar.gz
redmine-7f9d2b080416132e0357bf3b95f6fa60082ba10b.zip
Render TOC as nested lists (#1857).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4377 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/helpers')
-rw-r--r--test/unit/helpers/application_helper_test.rb39
1 files changed, 26 insertions, 13 deletions
diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb
index be4c79582..02b15fbf5 100644
--- a/test/unit/helpers/application_helper_test.rb
+++ b/test/unit/helpers/application_helper_test.rb
@@ -423,25 +423,38 @@ h2. Subtitle with [[Wiki|another Wiki]] link
h2. Subtitle with %{color:red}red text%
-h2. Subtitle with *some* _modifiers_
+h3. Subtitle with *some* _modifiers_
h1. Another title
-h2. An "Internet link":http://www.redmine.org/ inside subtitle
+h3. An "Internet link":http://www.redmine.org/ inside subtitle
h2. "Project Name !/attachments/1234/logo_small.gif! !/attachments/5678/logo_2.png!":/projects/projectname/issues
RAW
- expected = '<ul class="toc">' +
- '<li class="heading1"><a href="#Title">Title</a></li>' +
- '<li class="heading2"><a href="#Subtitle-with-a-Wiki-link">Subtitle with a Wiki link</a></li>' +
- '<li class="heading2"><a href="#Subtitle-with-another-Wiki-link">Subtitle with another Wiki link</a></li>' +
- '<li class="heading2"><a href="#Subtitle-with-red-text">Subtitle with red text</a></li>' +
- '<li class="heading2"><a href="#Subtitle-with-some-modifiers">Subtitle with some modifiers</a></li>' +
- '<li class="heading1"><a href="#Another-title">Another title</a></li>' +
- '<li class="heading2"><a href="#An-Internet-link-inside-subtitle">An Internet link inside subtitle</a></li>' +
- '<li class="heading2"><a href="#Project-Name">Project Name</a></li>' +
+ expected = '<ul class="toc">' +
+ '<li><a href="#Title">Title</a>' +
+ '<ul>' +
+ '<li><a href="#Subtitle-with-a-Wiki-link">Subtitle with a Wiki link</a></li>' +
+ '<li><a href="#Subtitle-with-another-Wiki-link">Subtitle with another Wiki link</a></li>' +
+ '<li><a href="#Subtitle-with-red-text">Subtitle with red text</a>' +
+ '<ul>' +
+ '<li><a href="#Subtitle-with-some-modifiers">Subtitle with some modifiers</a></li>' +
+ '</ul>' +
+ '</li>' +
+ '</ul>' +
+ '</li>' +
+ '<li><a href="#Another-title">Another title</a>' +
+ '<ul>' +
+ '<li>' +
+ '<ul>' +
+ '<li><a href="#An-Internet-link-inside-subtitle">An Internet link inside subtitle</a></li>' +
+ '</ul>' +
+ '</li>' +
+ '<li><a href="#Project-Name">Project Name</a></li>' +
+ '</ul>' +
+ '</li>' +
'</ul>'
@project = Project.find(1)
@@ -458,8 +471,8 @@ h1. Included
RAW
expected = '<ul class="toc">' +
- '<li class="heading1"><a href="#Included">Included</a></li>' +
- '<li class="heading1"><a href="#Child-page-1">Child page 1</a></li>' +
+ '<li><a href="#Included">Included</a></li>' +
+ '<li><a href="#Child-page-1">Child page 1</a></li>' +
'</ul>'
@project = Project.find(1)