From 2d11265ec5e1696769bbd0f115cc14d2461c588f Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 1 May 2008 12:56:59 +0000 Subject: 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 --- test/functional/projects_controller_test.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'test/functional') 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 -- cgit v1.2.3