summaryrefslogtreecommitdiffstats
path: root/test/unit/project_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-01-16 21:27:48 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-01-16 21:27:48 +0000
commit049051103b02efdef64f4119959d95d23d45e392 (patch)
treecfb967b5c44fdbdb2e5fc5aa328a058128238379 /test/unit/project_test.rb
parent18066ba8bf68da4b00b7e740e6c67f8d8b1e0093 (diff)
downloadredmine-049051103b02efdef64f4119959d95d23d45e392.tar.gz
redmine-049051103b02efdef64f4119959d95d23d45e392.zip
On the calendar, the gantt and in the Tracker filter on the issue list, only active trackers of the project (and its sub projects) can be selected.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1071 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/project_test.rb')
-rw-r--r--test/unit/project_test.rb16
1 files changed, 15 insertions, 1 deletions
diff --git a/test/unit/project_test.rb b/test/unit/project_test.rb
index 62ba2b02d..b05b7b09f 100644
--- a/test/unit/project_test.rb
+++ b/test/unit/project_test.rb
@@ -18,7 +18,7 @@
require File.dirname(__FILE__) + '/../test_helper'
class ProjectTest < Test::Unit::TestCase
- fixtures :projects, :issues, :issue_statuses, :journals, :journal_details, :users, :members, :roles
+ fixtures :projects, :issues, :issue_statuses, :journals, :journal_details, :users, :members, :roles, :projects_trackers, :trackers
def setup
@ecookbook = Project.find(1)
@@ -112,6 +112,20 @@ class ProjectTest < Test::Unit::TestCase
sub.parent = Project.find(2)
assert !sub.save
end
+
+ def test_rolled_up_trackers
+ parent = Project.find(1)
+ child = parent.children.find(3)
+
+ assert_equal [1, 2], parent.tracker_ids
+ assert_equal [2, 3], child.tracker_ids
+
+ assert_kind_of Tracker, parent.rolled_up_trackers.first
+ assert_equal Tracker.find(1), parent.rolled_up_trackers.first
+
+ assert_equal [1, 2, 3], parent.rolled_up_trackers.collect(&:id)
+ assert_equal [2, 3], child.rolled_up_trackers.collect(&:id)
+ end
def test_issues_status_changes
journals = @ecookbook.issues_status_changes 3.days.ago.to_date, Date.today