mirror of
https://github.com/redmine/redmine.git
synced 2026-03-16 01:20:59 +01:00
Set the parent page when creating a new wiki page from the "Add page" link (#26043).
git-svn-id: http://svn.redmine.org/redmine/trunk@16774 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -208,6 +208,13 @@ class WikiControllerTest < Redmine::ControllerTest
|
||||
assert_equal 'window.location = "/projects/ecookbook/wiki/New_Page"', response.body
|
||||
end
|
||||
|
||||
def test_post_new_should_redirect_to_edit_with_parent
|
||||
@request.session[:user_id] = 2
|
||||
|
||||
post :new, :params => {:project_id => 'ecookbook', :title => 'New_Page', :parent => 'Child_1'}
|
||||
assert_redirected_to '/projects/ecookbook/wiki/New_Page?parent=Child_1'
|
||||
end
|
||||
|
||||
def test_post_new_with_invalid_title_should_display_errors
|
||||
@request.session[:user_id] = 2
|
||||
|
||||
|
||||
Reference in New Issue
Block a user