summaryrefslogtreecommitdiffstats
path: root/test/functional/projects_controller_test.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2020-12-12 05:40:09 +0000
committerGo MAEDA <maeda@farend.jp>2020-12-12 05:40:09 +0000
commit1e906c5ebf80c694037e8638d5ecbb52292242ee (patch)
tree2ea9b2406c19a795cf37ef72295f9a81dc0ef603 /test/functional/projects_controller_test.rb
parent5d017f42be3ecdcbc63f8189cadf832b70d6b661 (diff)
downloadredmine-1e906c5ebf80c694037e8638d5ecbb52292242ee.tar.gz
redmine-1e906c5ebf80c694037e8638d5ecbb52292242ee.zip
Fix that disabled trackers of subprojects are listed in project overview (#10084).
Patch by Yuichi HARADA. git-svn-id: http://svn.redmine.org/redmine/trunk@20635 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/projects_controller_test.rb')
-rw-r--r--test/functional/projects_controller_test.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/functional/projects_controller_test.rb b/test/functional/projects_controller_test.rb
index c7329b2e5..89945de75 100644
--- a/test/functional/projects_controller_test.rb
+++ b/test/functional/projects_controller_test.rb
@@ -750,6 +750,25 @@ class ProjectsControllerTest < Redmine::ControllerTest
assert_select 'table.issue-report td.total a', :text => %r{\A[1-9]\d*\z}
end
+ def test_show_should_not_display_subprojects_trackers_when_subprojects_issues_is_not_displayed
+ project = Project.find('ecookbook')
+ tracker = project.trackers.find_by(name: 'Support request')
+ project.trackers.delete(tracker)
+ @request.session[:user_id] = 2
+
+ with_settings :display_subprojects_issues => '1' do
+ get(:show, :params => {:id => 'ecookbook'})
+ assert_response :success
+ assert_select 'table.issue-report td.name', :text => 'Support request', :count => 1
+ end
+
+ with_settings :display_subprojects_issues => '0' do
+ get(:show, :params => {:id => 'ecookbook'})
+ assert_response :success
+ assert_select 'table.issue-report td.name', :text => 'Support request', :count => 0
+ end
+ end
+
def test_show_should_spent_and_estimated_time
@request.session[:user_id] = 1
get(:show, :params => {:id => 'ecookbook'})