summaryrefslogtreecommitdiffstats
path: root/test/functional/wiki_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-12-03 20:30:50 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-12-03 20:30:50 +0000
commita398faa5d704e06468674e491a01463faa5be7f6 (patch)
tree91a5ef15c053a2c1c6a567f2ee9bed93680cbbed /test/functional/wiki_controller_test.rb
parent81bcb4d99901b65a13f6f37565d1b819b0627816 (diff)
downloadredmine-a398faa5d704e06468674e491a01463faa5be7f6.tar.gz
redmine-a398faa5d704e06468674e491a01463faa5be7f6.zip
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
Diffstat (limited to 'test/functional/wiki_controller_test.rb')
-rw-r--r--test/functional/wiki_controller_test.rb7
1 files changed, 7 insertions, 0 deletions
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,