diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-06-15 11:00:40 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-06-15 11:00:40 +0000 |
commit | 11e9891425c4fb59ebeb7080077c1097d3800f8c (patch) | |
tree | 483492b396acb21cd166a27a4cfa87caad08c33a /test | |
parent | 8b2105e20ac76dba21cd8e313a75a5d52850cf69 (diff) | |
download | redmine-11e9891425c4fb59ebeb7080077c1097d3800f8c.tar.gz redmine-11e9891425c4fb59ebeb7080077c1097d3800f8c.zip |
Fixed: TOC does not remove colorization markups (#1423).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1542 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/helpers/application_helper_test.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index 1e75dbd64..7fa96d7e2 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -183,6 +183,34 @@ class ApplicationHelperTest < HelperTestCase assert_equal '<p>Dashes: ---</p>', textilizable('Dashes: ---') end + def test_table_of_content + raw = <<-RAW +{{toc}} + +h1. Title + +Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sed libero. + +h2. Subtitle + +Nullam commodo metus accumsan nulla. Curabitur lobortis dui id dolor. + +h2. Subtitle with %{color:red}red text% + +h1. Another title + +RAW + + expected = '<div class="toc">' + + '<a href="#1" class="heading1">Title</a>' + + '<a href="#2" class="heading2">Subtitle</a>' + + '<a href="#3" class="heading2">Subtitle with red text</a>' + + '<a href="#4" class="heading1">Another title</a>' + + '</div>' + + assert textilizable(raw).include?(expected) + end + def test_blockquote # orig raw text raw = <<-RAW |