diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-02-09 13:56:11 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-02-09 13:56:11 +0000 |
commit | 0f2ee79f35ac109df4384c1826ff3b687f1421eb (patch) | |
tree | cccee523a46f83b986b384c9e80638bcfd14307c /test/unit/project_test.rb | |
parent | 1fe29c8a0c037a3d7bf1a83e1beb1261367fe6ac (diff) | |
download | redmine-0f2ee79f35ac109df4384c1826ff3b687f1421eb.tar.gz redmine-0f2ee79f35ac109df4384c1826ff3b687f1421eb.zip |
Fixed that project overview page shows trackers from subprojects with disabled issue module (#13076).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11336 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/project_test.rb')
-rw-r--r-- | test/unit/project_test.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/unit/project_test.rb b/test/unit/project_test.rb index e9c6e212a..b9aabebed 100644 --- a/test/unit/project_test.rb +++ b/test/unit/project_test.rb @@ -434,6 +434,19 @@ class ProjectTest < ActiveSupport::TestCase assert_equal [1,2], parent.rolled_up_trackers.collect(&:id) end + test "#rolled_up_trackers should ignore projects with issue_tracking module disabled" do + parent = Project.generate! + parent.trackers = Tracker.find([1, 2]) + child = Project.generate_with_parent!(parent) + child.trackers = Tracker.find([2, 3]) + + assert_equal [1, 2, 3], parent.rolled_up_trackers.collect(&:id).sort + + assert child.disable_module!(:issue_tracking) + parent.reload + assert_equal [1, 2], parent.rolled_up_trackers.collect(&:id).sort + end + test "#rolled_up_versions should include the versions for the current project" do project = Project.generate! parent_version_1 = Version.generate!(:project => project) |