Defect #43730 » 0003-update-existing-child-pages-macro-tests.diff
| w/test/unit/lib/redmine/wiki_formatting/macros_test.rb | ||
|---|---|---|
|
def test_macro_child_pages
|
||
|
expected =
|
||
|
"<p><ul class=\"pages-hierarchy\">\n" \
|
||
|
"<div><ul class=\"pages-hierarchy\">\n" \
|
||
|
"<li><a href=\"/projects/ecookbook/wiki/Child_1\">Child 1</a>\n" \
|
||
|
"<ul class=\"pages-hierarchy\">\n" \
|
||
|
"<li><a href=\"/projects/ecookbook/wiki/Child_1_1\">Child 1 1</a></li>\n</ul>\n</li>\n" \
|
||
|
"<li><a href=\"/projects/ecookbook/wiki/Child_2\">Child 2</a></li>\n" \
|
||
|
"</ul>\n</p>"
|
||
|
"</ul>\n</div>"
|
||
|
@project = Project.find(1)
|
||
|
with_settings :text_formatting => 'textile' do
|
||
|
# child pages of the current wiki page
|
||
| ... | ... | |
|
def test_macro_child_pages_with_parent_option
|
||
|
expected =
|
||
|
"<p><ul class=\"pages-hierarchy\">\n" \
|
||
|
"<div><ul class=\"pages-hierarchy\">\n" \
|
||
|
"<li><a href=\"/projects/ecookbook/wiki/Another_page\">Another page</a>\n" \
|
||
|
"<ul class=\"pages-hierarchy\">\n" \
|
||
|
"<li><a href=\"/projects/ecookbook/wiki/Child_1\">Child 1</a>\n" \
|
||
|
"<ul class=\"pages-hierarchy\">\n" \
|
||
|
"<li><a href=\"/projects/ecookbook/wiki/Child_1_1\">Child 1 1</a></li>\n</ul>\n</li>\n" \
|
||
|
"<li><a href=\"/projects/ecookbook/wiki/Child_2\">Child 2</a></li>\n" \
|
||
|
"</ul>\n</li>\n</ul>\n</p>"
|
||
|
"</ul>\n</li>\n</ul>\n</div>"
|
||
|
@project = Project.find(1)
|
||
|
with_settings :text_formatting => 'textile' do
|
||
| ... | ... | |
|
def test_macro_child_pages_with_depth_option
|
||
|
expected =
|
||
|
"<p><ul class=\"pages-hierarchy\">\n" \
|
||
|
"<div><ul class=\"pages-hierarchy\">\n" \
|
||
|
"<li><a href=\"/projects/ecookbook/wiki/Child_1\">Child 1</a></li>\n" \
|
||
|
"<li><a href=\"/projects/ecookbook/wiki/Child_2\">Child 2</a></li>\n" \
|
||
|
"</ul>\n</p>"
|
||
|
"</ul>\n</div>"
|
||
|
@project = Project.find(1)
|
||
|
with_settings :text_formatting => 'textile' do
|
||
|
assert_equal expected, textilizable("{{child_pages(depth=1)}}", :object => WikiPage.find(2).content)
|
||
- « Previous
- 1
- …
- 13
- 14
- 15
- Next »