Project

General

Profile

Defect #43730 » 0003-update-existing-child-pages-macro-tests.diff

Alexander Meindl, 2026-07-28 18:00

View differences:

w/test/unit/lib/redmine/wiki_formatting/macros_test.rb
407 407

  
408 408
  def test_macro_child_pages
409 409
    expected =
410
      "<p><ul class=\"pages-hierarchy\">\n" \
410
      "<div><ul class=\"pages-hierarchy\">\n" \
411 411
      "<li><a href=\"/projects/ecookbook/wiki/Child_1\">Child 1</a>\n" \
412 412
      "<ul class=\"pages-hierarchy\">\n" \
413 413
      "<li><a href=\"/projects/ecookbook/wiki/Child_1_1\">Child 1 1</a></li>\n</ul>\n</li>\n" \
414 414
      "<li><a href=\"/projects/ecookbook/wiki/Child_2\">Child 2</a></li>\n" \
415
      "</ul>\n</p>"
415
      "</ul>\n</div>"
416 416
    @project = Project.find(1)
417 417
    with_settings :text_formatting => 'textile' do
418 418
      # child pages of the current wiki page
......
427 427

  
428 428
  def test_macro_child_pages_with_parent_option
429 429
    expected =
430
      "<p><ul class=\"pages-hierarchy\">\n" \
430
      "<div><ul class=\"pages-hierarchy\">\n" \
431 431
      "<li><a href=\"/projects/ecookbook/wiki/Another_page\">Another page</a>\n" \
432 432
      "<ul class=\"pages-hierarchy\">\n" \
433 433
      "<li><a href=\"/projects/ecookbook/wiki/Child_1\">Child 1</a>\n" \
434 434
      "<ul class=\"pages-hierarchy\">\n" \
435 435
      "<li><a href=\"/projects/ecookbook/wiki/Child_1_1\">Child 1 1</a></li>\n</ul>\n</li>\n" \
436 436
      "<li><a href=\"/projects/ecookbook/wiki/Child_2\">Child 2</a></li>\n" \
437
      "</ul>\n</li>\n</ul>\n</p>"
437
      "</ul>\n</li>\n</ul>\n</div>"
438 438

  
439 439
    @project = Project.find(1)
440 440
    with_settings :text_formatting => 'textile' do
......
455 455

  
456 456
  def test_macro_child_pages_with_depth_option
457 457
    expected =
458
      "<p><ul class=\"pages-hierarchy\">\n" \
458
      "<div><ul class=\"pages-hierarchy\">\n" \
459 459
        "<li><a href=\"/projects/ecookbook/wiki/Child_1\">Child 1</a></li>\n" \
460 460
        "<li><a href=\"/projects/ecookbook/wiki/Child_2\">Child 2</a></li>\n" \
461
        "</ul>\n</p>"
461
        "</ul>\n</div>"
462 462
    @project = Project.find(1)
463 463
    with_settings :text_formatting => 'textile' do
464 464
      assert_equal expected, textilizable("{{child_pages(depth=1)}}", :object => WikiPage.find(2).content)
(15-15/15)