summaryrefslogtreecommitdiffstats
path: root/test/functional/wiki_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-04-11 12:56:18 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-04-11 12:56:18 +0000
commit58792737394c59ecac08db2cea0eeebb836f160a (patch)
tree20356d7c4801a53e47df1273d7c011441beee62c /test/functional/wiki_controller_test.rb
parent3979224693c796b162e3bf815fa33265869f1b18 (diff)
downloadredmine-58792737394c59ecac08db2cea0eeebb836f160a.tar.gz
redmine-58792737394c59ecac08db2cea0eeebb836f160a.zip
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
Diffstat (limited to 'test/functional/wiki_controller_test.rb')
-rw-r--r--test/functional/wiki_controller_test.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb
index 3f9ac7eac..298cfee9c 100644
--- a/test/functional/wiki_controller_test.rb
+++ b/test/functional/wiki_controller_test.rb
@@ -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