diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-05-14 18:19:37 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-05-14 18:19:37 +0000 |
commit | 9e225cc63ff889d3dc6f2f904d8e0c33850073b6 (patch) | |
tree | 2b9735e0ea949eadd8ac346295e553f52a4c424e /test | |
parent | 7ee38a95a0052ddc544137f32fcf9114e5ffabb9 (diff) | |
download | redmine-9e225cc63ff889d3dc6f2f904d8e0c33850073b6.tar.gz redmine-9e225cc63ff889d3dc6f2f904d8e0c33850073b6.zip |
Fixed: private subprojects are listed on the issues view (#1217).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1432 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/issues_controller_test.rb | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index a6d2ca6e3..c4389fedd 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -53,13 +53,44 @@ class IssuesControllerTest < Test::Unit::TestCase assert_template 'index.rhtml' assert_not_nil assigns(:issues) assert_nil assigns(:project) + assert_tag :tag => 'a', :content => /Can't print recipes/ + assert_tag :tag => 'a', :content => /Subproject issue/ + # private projects hidden + assert_no_tag :tag => 'a', :content => /Issue of a private subproject/ + assert_no_tag :tag => 'a', :content => /Issue on project 2/ end def test_index_with_project + Setting.display_subprojects_issues = 0 get :index, :project_id => 1 assert_response :success assert_template 'index.rhtml' assert_not_nil assigns(:issues) + assert_tag :tag => 'a', :content => /Can't print recipes/ + assert_no_tag :tag => 'a', :content => /Subproject issue/ + end + + def test_index_with_project_and_subprojects + Setting.display_subprojects_issues = 1 + get :index, :project_id => 1 + assert_response :success + assert_template 'index.rhtml' + assert_not_nil assigns(:issues) + assert_tag :tag => 'a', :content => /Can't print recipes/ + assert_tag :tag => 'a', :content => /Subproject issue/ + assert_no_tag :tag => 'a', :content => /Issue of a private subproject/ + end + + def test_index_with_project_and_subprojects_should_show_private_subprojects + @request.session[:user_id] = 2 + Setting.display_subprojects_issues = 1 + get :index, :project_id => 1 + assert_response :success + assert_template 'index.rhtml' + assert_not_nil assigns(:issues) + assert_tag :tag => 'a', :content => /Can't print recipes/ + assert_tag :tag => 'a', :content => /Subproject issue/ + assert_tag :tag => 'a', :content => /Issue of a private subproject/ end def test_index_with_project_and_filter |