summaryrefslogtreecommitdiffstats
path: root/test/functional/gantts_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-11-21 14:57:53 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-11-21 14:57:53 +0000
commitdfc76ce642ee1ca5f50f15a0d3956c688d38246a (patch)
treee05e07f4ad02f85e98d31efaa27e66e26c0edef5 /test/functional/gantts_controller_test.rb
parent7087a53f27a878864800ba08d20212cd160b7193 (diff)
downloadredmine-dfc76ce642ee1ca5f50f15a0d3956c688d38246a.tar.gz
redmine-dfc76ce642ee1ca5f50f15a0d3956c688d38246a.zip
Fixed: new gantt chart discloses all private projects names (#6276).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4425 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/gantts_controller_test.rb')
-rw-r--r--test/functional/gantts_controller_test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/gantts_controller_test.rb b/test/functional/gantts_controller_test.rb
index 4c891c3d0..30ef14e09 100644
--- a/test/functional/gantts_controller_test.rb
+++ b/test/functional/gantts_controller_test.rb
@@ -49,6 +49,18 @@ class GanttsControllerTest < ActionController::TestCase
assert_nil assigns(:gantt).project
end
+ should "not disclose private projects" do
+ get :show
+ assert_response :success
+ assert_template 'show.html.erb'
+
+ assert_tag 'a', :content => /eCookbook/
+ # Root private project
+ assert_no_tag 'a', {:content => /OnlineStore/}
+ # Private children of a public project
+ assert_no_tag 'a', :content => /Private child of eCookbook/
+ end
+
should "export to pdf" do
get :show, :project_id => 1, :format => 'pdf'
assert_response :success