|
|
@@ -1167,6 +1167,22 @@ RAW |
|
|
|
assert textilizable(raw).gsub("\n", "").include?(expected) |
|
|
|
end |
|
|
|
|
|
|
|
def test_toc_with_textile_formatting_should_be_parsed |
|
|
|
with_settings :text_formatting => 'textile' do |
|
|
|
assert_select_in textilizable("{{toc}}\n\nh1. Heading"), 'ul.toc li', :text => 'Heading' |
|
|
|
assert_select_in textilizable("{{<toc}}\n\nh1. Heading"), 'ul.toc.left li', :text => 'Heading' |
|
|
|
assert_select_in textilizable("{{>toc}}\n\nh1. Heading"), 'ul.toc.right li', :text => 'Heading' |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
def test_toc_with_markdown_formatting_should_be_parsed |
|
|
|
with_settings :text_formatting => 'markdown' do |
|
|
|
assert_select_in textilizable("{{toc}}\n\n# Heading"), 'ul.toc li', :text => 'Heading' |
|
|
|
assert_select_in textilizable("{{<toc}}\n\n# Heading"), 'ul.toc.left li', :text => 'Heading' |
|
|
|
assert_select_in textilizable("{{>toc}}\n\n# Heading"), 'ul.toc.right li', :text => 'Heading' |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
def test_section_edit_links |
|
|
|
raw = <<-RAW |
|
|
|
h1. Title |