diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/fixtures/roles.yml | 1 | ||||
-rw-r--r-- | test/functional/wiki_controller_test.rb | 19 |
2 files changed, 20 insertions, 0 deletions
diff --git a/test/fixtures/roles.yml b/test/fixtures/roles.yml index ce7e1b4e7..072440d31 100644 --- a/test/fixtures/roles.yml +++ b/test/fixtures/roles.yml @@ -51,6 +51,7 @@ roles_001: - :protect_wiki_pages - :delete_wiki_pages - :rename_wiki_pages + - :manage_wiki - :view_messages - :add_messages - :edit_messages diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb index 7260d9094..314d46385 100644 --- a/test/functional/wiki_controller_test.rb +++ b/test/functional/wiki_controller_test.rb @@ -843,6 +843,25 @@ class WikiControllerTest < Redmine::ControllerTest assert_equal project.wiki.id, page.wiki_id end + def test_rename_as_start_page + @request.session[:user_id] = 2 + + post :rename, :params => { + :project_id => 'ecookbook', + :id => 'Another_page', + :wiki_page => { + :wiki_id => '1', + :title => 'Another_page', + :redirect_existing_links => '1', + :is_start_page => '1' + } + } + assert_redirected_to '/projects/ecookbook/wiki/Another_page' + + wiki = Wiki.find(1) + assert_equal 'Another_page', wiki.start_page + end + def test_destroy_a_page_without_children_should_not_ask_confirmation @request.session[:user_id] = 2 delete :destroy, :params => {:project_id => 1, :id => 'Child_2'} |