Adds a Setting to control how an Issue's done_ratio is calculated:

* Issue field (default) - the done_ratio field for the Issue
* Issue status - uses the Issue Status's value

  #4274

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3151 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis
2009-12-11 18:48:34 +00:00
parent a83501364d
commit 4fe14e71c2
18 changed files with 212 additions and 4 deletions

View File

@@ -70,4 +70,27 @@ class IssueStatusesControllerTest < ActionController::TestCase
assert_redirected_to 'issue_statuses/list'
assert_not_nil IssueStatus.find_by_id(1)
end
context "on POST to :update_issue_done_ratio" do
context "with Setting.issue_done_ratio using the issue_field" do
setup do
Setting.issue_done_ratio = 'issue_field'
post :update_issue_done_ratio
end
should_set_the_flash_to /not updated/
should_redirect_to('the list') { '/issue_statuses/list' }
end
context "with Setting.issue_done_ratio using the issue_status" do
setup do
Setting.issue_done_ratio = 'issue_status'
post :update_issue_done_ratio
end
should_set_the_flash_to /Issue done ratios updated/
should_redirect_to('the list') { '/issue_statuses/list' }
end
end
end