mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
fix source indent of GanttsControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@20338 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
dc8606973d
commit
c1a203267b
@ -82,37 +82,39 @@ class GanttsControllerTest < Redmine::ControllerTest
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_gantt_at_minimal_zoom
|
def test_gantt_at_minimal_zoom
|
||||||
get :show, :params => {
|
get(
|
||||||
|
:show,
|
||||||
|
:params => {
|
||||||
:project_id => 1,
|
:project_id => 1,
|
||||||
:zoom => 1
|
:zoom => 1
|
||||||
}
|
}
|
||||||
|
)
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_select 'input[type=hidden][name=zoom][value=?]', '1'
|
assert_select 'input[type=hidden][name=zoom][value=?]', '1'
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_gantt_at_maximal_zoom
|
def test_gantt_at_maximal_zoom
|
||||||
get :show, :params => {
|
get(
|
||||||
|
:show,
|
||||||
|
:params => {
|
||||||
:project_id => 1,
|
:project_id => 1,
|
||||||
:zoom => 4
|
:zoom => 4
|
||||||
}
|
}
|
||||||
|
)
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_select 'input[type=hidden][name=zoom][value=?]', '4'
|
assert_select 'input[type=hidden][name=zoom][value=?]', '4'
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_gantt_should_work_without_issue_due_dates
|
def test_gantt_should_work_without_issue_due_dates
|
||||||
Issue.update_all("due_date = NULL")
|
Issue.update_all("due_date = NULL")
|
||||||
get :show, :params => {
|
get(:show, :params => {:project_id => 1})
|
||||||
:project_id => 1
|
|
||||||
}
|
|
||||||
assert_response :success
|
assert_response :success
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_gantt_should_work_without_issue_and_version_due_dates
|
def test_gantt_should_work_without_issue_and_version_due_dates
|
||||||
Issue.update_all("due_date = NULL")
|
Issue.update_all("due_date = NULL")
|
||||||
Version.update_all("effective_date = NULL")
|
Version.update_all("effective_date = NULL")
|
||||||
get :show, :params => {
|
get(:show, :params => {:project_id => 1})
|
||||||
:project_id => 1
|
|
||||||
}
|
|
||||||
assert_response :success
|
assert_response :success
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -160,9 +162,7 @@ class GanttsControllerTest < Redmine::ControllerTest
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_gantt_should_export_to_pdf_cross_project
|
def test_gantt_should_export_to_pdf_cross_project
|
||||||
get :show, :params => {
|
get(:show, :params => {:format => 'pdf'})
|
||||||
:format => 'pdf'
|
|
||||||
}
|
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_equal 'application/pdf', @response.media_type
|
assert_equal 'application/pdf', @response.media_type
|
||||||
assert @response.body.starts_with?('%PDF')
|
assert @response.body.starts_with?('%PDF')
|
||||||
@ -187,21 +187,27 @@ class GanttsControllerTest < Redmine::ControllerTest
|
|||||||
with_settings :gantt_months_limit => '40' do
|
with_settings :gantt_months_limit => '40' do
|
||||||
# `months` parameter can be less than or equal to
|
# `months` parameter can be less than or equal to
|
||||||
# `Setting.gantt_months_limit`
|
# `Setting.gantt_months_limit`
|
||||||
get :show, :params => {
|
get(
|
||||||
|
:show,
|
||||||
|
:params => {
|
||||||
:project_id => 1,
|
:project_id => 1,
|
||||||
:zoom => 4,
|
:zoom => 4,
|
||||||
:months => 40
|
:months => 40
|
||||||
}
|
}
|
||||||
|
)
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_select 'div.gantt_hdr>a', :text => /^[\d-]+$/, :count => 40
|
assert_select 'div.gantt_hdr>a', :text => /^[\d-]+$/, :count => 40
|
||||||
|
|
||||||
# Displays 6 months (the default value for `months`) if `months` exceeds
|
# Displays 6 months (the default value for `months`) if `months` exceeds
|
||||||
# gant_months_limit
|
# gant_months_limit
|
||||||
get :show, :params => {
|
get(
|
||||||
|
:show,
|
||||||
|
:params => {
|
||||||
:project_id => 1,
|
:project_id => 1,
|
||||||
:zoom => 4,
|
:zoom => 4,
|
||||||
:months => 41
|
:months => 41
|
||||||
}
|
}
|
||||||
|
)
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_select 'div.gantt_hdr>a', :text => /^[\d-]+$/, :count => 6
|
assert_select 'div.gantt_hdr>a', :text => /^[\d-]+$/, :count => 6
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user