diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-10-10 18:56:59 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-10-10 18:56:59 +0000 |
commit | 5f10cc867327cd2d2620f10b30ca9c5f2f3a8791 (patch) | |
tree | f842a577ec88d42c5ef72d57d195e3b695e106f9 /test | |
parent | 45203143c15d3909e1cd343fc59ee21cc5f52a86 (diff) | |
download | redmine-5f10cc867327cd2d2620f10b30ca9c5f2f3a8791.tar.gz redmine-5f10cc867327cd2d2620f10b30ca9c5f2f3a8791.zip |
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
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/repository_test.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/unit/repository_test.rb b/test/unit/repository_test.rb index bc2fa626c..ea2122aa7 100644 --- a/test/unit/repository_test.rb +++ b/test/unit/repository_test.rb @@ -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 |