summaryrefslogtreecommitdiffstats
path: root/test/functional
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-05-01 12:56:59 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-05-01 12:56:59 +0000
commit2d11265ec5e1696769bbd0f115cc14d2461c588f (patch)
treed98870b81a0b6bbc33d77f8ae330737ddb5e225f /test/functional
parent6d637ad98255ab85cfc7728a0972e0b5181770a5 (diff)
downloadredmine-2d11265ec5e1696769bbd0f115cc14d2461c588f.tar.gz
redmine-2d11265ec5e1696769bbd0f115cc14d2461c588f.zip
Fixed: private subprojects names are revealed on the project overview (#1152).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1399 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/projects_controller_test.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/functional/projects_controller_test.rb b/test/functional/projects_controller_test.rb
index eb5795152..5af7b5572 100644
--- a/test/functional/projects_controller_test.rb
+++ b/test/functional/projects_controller_test.rb
@@ -63,6 +63,21 @@ class ProjectsControllerTest < Test::Unit::TestCase
assert_equal Project.find_by_identifier('ecookbook'), assigns(:project)
end
+ def test_private_subprojects_hidden
+ get :show, :id => 'ecookbook'
+ assert_response :success
+ assert_template 'show'
+ assert_no_tag :tag => 'a', :content => /Private child/
+ end
+
+ def test_private_subprojects_visible
+ @request.session[:user_id] = 2 # manager who is a member of the private subproject
+ get :show, :id => 'ecookbook'
+ assert_response :success
+ assert_template 'show'
+ assert_tag :tag => 'a', :content => /Private child/
+ end
+
def test_settings
@request.session[:user_id] = 2 # manager
get :settings, :id => 1