diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-10-25 19:44:04 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-10-25 19:44:04 +0000 |
commit | 9e313087205721ed3c6239be7cde55598d29f9e6 (patch) | |
tree | c5ba4ab52453907afae728887b470f95008bbbdb /test/functional/wiki_controller_test.rb | |
parent | b2e035fa96e4c2b06dcd559850d11987ba96ee1c (diff) | |
download | redmine-9e313087205721ed3c6239be7cde55598d29f9e6.tar.gz redmine-9e313087205721ed3c6239be7cde55598d29f9e6.zip |
REST API for retrieving wiki pages (#7082).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10716 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 720a9b6f8..98fc20038 100644 --- a/test/functional/wiki_controller_test.rb +++ b/test/functional/wiki_controller_test.rb @@ -75,6 +75,13 @@ class WikiControllerTest < ActionController::TestCase assert_select 'a[href=?]', '/projects/ecookbook/wiki/CookBook_documentation', :text => /Current version/ end + def test_show_old_version_without_permission_should_be_denied + Role.anonymous.remove_permission! :view_wiki_edits + + get :show, :project_id => 'ecookbook', :id => 'CookBook_documentation', :version => '2' + assert_redirected_to '/login?back_url=http%3A%2F%2Ftest.host%2Fprojects%2Fecookbook%2Fwiki%2FCookBook_documentation%2F2' + end + def test_show_first_version get :show, :project_id => 'ecookbook', :id => 'CookBook_documentation', :version => '1' assert_response :success |