Introduce configuration for done ratio options interval (#31756).

Patch by Go MAEDA (@maeda).


git-svn-id: https://svn.redmine.org/redmine/trunk@22849 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2024-05-29 15:06:28 +00:00
parent 3acc94914f
commit a73eb69648
8 changed files with 25 additions and 4 deletions

View File

@@ -8736,4 +8736,19 @@ class IssuesControllerTest < Redmine::ControllerTest
end
end
end
def test_get_new_with_issue_field_five_percent_increments
with_settings :issue_done_ratio => 'issue_field', :issue_done_ratio_interval => 5 do
@request.session[:user_id] = 1
get :new
assert_response :success
assert_select 'select#issue_done_ratio' do
assert_select 'option', count: 21
assert_select 'option:nth-of-type(1)', text: '0 %'
assert_select 'option:nth-of-type(2)', text: '5 %'
assert_select 'option:nth-of-type(21)', text: '100 %'
end
end
end
end