mirror of
https://github.com/meineerde/redmine.git
synced 2025-10-17 17:01:01 +00:00
Test for r18136 (#14654).
Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@18137 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
391a9469d1
commit
0756ea42e4
@ -161,4 +161,28 @@ class GanttsControllerTest < Redmine::ControllerTest
|
||||
assert_equal 'image/png', @response.content_type
|
||||
end
|
||||
end
|
||||
|
||||
def test_gantt_should_respect_gantt_months_limit_setting
|
||||
with_settings :gantt_months_limit => '40' do
|
||||
# `months` parameter can be less than or equal to
|
||||
# `Setting.gantt_months_limit`
|
||||
get :show, :params => {
|
||||
:project_id => 1,
|
||||
:zoom => 4,
|
||||
:months => 40
|
||||
}
|
||||
assert_response :success
|
||||
assert_select 'div.gantt_hdr>a', :text => /^[\d-]+$/, :count => 40
|
||||
|
||||
# Displays 6 months (the default value for `months`) if `months` exceeds
|
||||
# gant_months_limit
|
||||
get :show, :params => {
|
||||
:project_id => 1,
|
||||
:zoom => 4,
|
||||
:months => 41
|
||||
}
|
||||
assert_response :success
|
||||
assert_select 'div.gantt_hdr>a', :text => /^[\d-]+$/, :count => 6
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user