From a398faa5d704e06468674e491a01463faa5be7f6 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 3 Dec 2011 20:30:50 +0000 Subject: [PATCH] Adds a test for when accessing wiki history without permission. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8064 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/wiki_controller_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb index 8b887ecdb..70dc20668 100644 --- a/test/functional/wiki_controller_test.rb +++ b/test/functional/wiki_controller_test.rb @@ -126,6 +126,13 @@ class WikiControllerTest < ActionController::TestCase assert_template 'edit' end + def test_show_should_not_show_history_without_permission + Role.anonymous.remove_permission! :view_wiki_edits + get :show, :project_id => 1, :id => 'Page with sections', :version => 2 + + assert_response 302 + end + def test_create_page @request.session[:user_id] = 2 put :update, :project_id => 1,