Mercurial > hg > soundsoftware-site
diff test/functional/gantts_controller_test.rb @ 119:8661b858af72
* Update to Redmine trunk rev 4705
author | Chris Cannam |
---|---|
date | Thu, 13 Jan 2011 14:12:06 +0000 |
parents | 94944d00e43c |
children | cbb26bc654de |
line wrap: on
line diff
--- a/test/functional/gantts_controller_test.rb Fri Nov 19 14:05:24 2010 +0000 +++ b/test/functional/gantts_controller_test.rb Thu Jan 13 14:12:06 2011 +0000 @@ -1,4 +1,4 @@ -require File.dirname(__FILE__) + '/../test_helper' +require File.expand_path('../../test_helper', __FILE__) class GanttsControllerTest < ActionController::TestCase fixtures :all @@ -49,6 +49,18 @@ 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