From ec7d1359301b28a506d3c9e9ad5785cf84d3fcd9 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 26 Jul 2008 12:54:54 +0000 Subject: Adds child_pages macro for wiki pages (#528). git-svn-id: http://redmine.rubyforge.org/svn/trunk@1699 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/fixtures/wiki_contents.yml | 2 +- test/functional/wiki_controller_test.rb | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/fixtures/wiki_contents.yml b/test/fixtures/wiki_contents.yml index 5d6d3f1de..8c53d4d97 100644 --- a/test/fixtures/wiki_contents.yml +++ b/test/fixtures/wiki_contents.yml @@ -2,7 +2,7 @@ wiki_contents_001: text: |- h1. CookBook documentation - + {{child_pages}} Some updated [[documentation]] here with gzipped history updated_on: 2007-03-07 00:10:51 +01:00 page_id: 1 diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb index 06d8cacf2..bbfdc8e7f 100644 --- a/test/functional/wiki_controller_test.rb +++ b/test/functional/wiki_controller_test.rb @@ -32,10 +32,16 @@ class WikiControllerTest < Test::Unit::TestCase end def test_show_start_page - get :index, :id => 1 + get :index, :id => 'ecookbook' assert_response :success assert_template 'show' assert_tag :tag => 'h1', :content => /CookBook documentation/ + + # child_pages macro + assert_tag :ul, :attributes => { :class => 'pages-hierarchy' }, + :child => { :tag => 'li', + :child => { :tag => 'a', :attributes => { :href => '/wiki/ecookbook/Page_with_an_inline_image' }, + :content => 'Page with an inline image' } } end def test_show_page_with_name -- cgit v1.2.3