Makes the wiki sidebar editable (#5208).

The content of the wiki page named 'Sidebar' is rendered in the sidebar if it exists. Permission to edit protected pages is required to create this page.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3632 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2010-04-11 12:56:18 +00:00
parent 3979224693
commit 5879273739
8 changed files with 61 additions and 1 deletions
+11
View File
@@ -70,6 +70,17 @@ class WikiControllerTest < ActionController::TestCase
:alt => 'This is a logo' }
end
def test_show_with_sidebar
page = Project.find(1).wiki.pages.new(:title => 'Sidebar')
page.content = WikiContent.new(:text => 'Side bar content for test_show_with_sidebar')
page.save!
get :index, :id => 1, :page => 'Another_page'
assert_response :success
assert_tag :tag => 'div', :attributes => {:id => 'sidebar'},
:content => /Side bar content for test_show_with_sidebar/
end
def test_show_unexistent_page_without_edit_right
get :index, :id => 1, :page => 'Unexistent page'
assert_response 404