Do a redirect when accessing a renamed wiki page.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5423 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2011-04-11 19:21:57 +00:00
parent 6db0e8dcef
commit 3cc7353093
4 changed files with 55 additions and 7 deletions
+7
View File
@@ -55,6 +55,13 @@ class WikiControllerTest < ActionController::TestCase
:alt => 'This is a logo' }
end
def test_show_redirected_page
WikiRedirect.create!(:wiki_id => 1, :title => 'Old_title', :redirects_to => 'Another_page')
get :show, :project_id => 'ecookbook', :id => 'Old_title'
assert_redirected_to '/projects/ecookbook/wiki/Another_page'
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')