Added the ability to set the "done ratio" of issues fixed by commit (original path by Nikolay Solakov, slightly edited).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@821 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2007-10-10 18:56:59 +00:00
parent 45203143c1
commit 5f10cc8673
4 changed files with 13 additions and 4 deletions
+6 -3
View File
@@ -39,7 +39,8 @@ class RepositoryTest < Test::Unit::TestCase
def test_scan_changesets_for_issue_ids
# choosing a status to apply to fix issues
Setting.commit_fix_status_id = IssueStatus.find(:first, :conditions => ["is_closed = ?", true]).id
Setting.commit_fix_done_ratio = "90"
# make sure issue 1 is not already closed
assert !Issue.find(1).status.is_closed?
@@ -47,8 +48,10 @@ class RepositoryTest < Test::Unit::TestCase
assert_equal [101, 102], Issue.find(3).changeset_ids
# fixed issues
assert Issue.find(1).status.is_closed?
assert_equal [101], Issue.find(1).changeset_ids
fixed_issue = Issue.find(1)
assert fixed_issue.status.is_closed?
assert_equal 90, fixed_issue.done_ratio
assert_equal [101], fixed_issue.changeset_ids
# ignoring commits referencing an issue of another project
assert_equal [], Issue.find(4).changesets