diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-04-11 19:21:57 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-04-11 19:21:57 +0000 |
commit | 3cc7353093a7cb8160fd34cb16aff099c5517e32 (patch) | |
tree | 5f16348e9417af9402a29ccdf8954d76fc2a8413 /test/functional/wiki_controller_test.rb | |
parent | 6db0e8dcef0bf1e4ece02641b51b9df38dae31dc (diff) | |
download | redmine-3cc7353093a7cb8160fd34cb16aff099c5517e32.tar.gz redmine-3cc7353093a7cb8160fd34cb16aff099c5517e32.zip |
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
Diffstat (limited to 'test/functional/wiki_controller_test.rb')
-rw-r--r-- | test/functional/wiki_controller_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb index 397018f54..9303d23fe 100644 --- a/test/functional/wiki_controller_test.rb +++ b/test/functional/wiki_controller_test.rb @@ -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') |