Mercurial > hg > soundsoftware-site
diff test/functional/gantts_controller_test.rb @ 117:af80e5618e9b redmine-1.1
* Update to Redmine 1.1-stable branch (Redmine SVN rev 4707)
author | Chris Cannam |
---|---|
date | Thu, 13 Jan 2011 12:53:21 +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 12:53:21 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