mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
cleanup: rubocop: fix Layout/IndentFirstHashElement in test/functional/reports_controller_test.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@19213 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
eb3595d11f
commit
afb40e740f
@ -31,18 +31,23 @@ class ReportsControllerTest < Redmine::ControllerTest
|
|||||||
:workflows
|
:workflows
|
||||||
|
|
||||||
def test_get_issue_report
|
def test_get_issue_report
|
||||||
get :issue_report, :params => {
|
get(
|
||||||
|
:issue_report,
|
||||||
|
:params => {
|
||||||
:id => 1
|
:id => 1
|
||||||
}
|
}
|
||||||
|
)
|
||||||
assert_response :success
|
assert_response :success
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_issue_report_with_subprojects_issues
|
def test_issue_report_with_subprojects_issues
|
||||||
Setting.stubs(:display_subprojects_issues?).returns(true)
|
Setting.stubs(:display_subprojects_issues?).returns(true)
|
||||||
get :issue_report, :params => {
|
get(
|
||||||
|
:issue_report,
|
||||||
|
:params => {
|
||||||
:id => 1
|
:id => 1
|
||||||
}
|
}
|
||||||
|
)
|
||||||
assert_response :success
|
assert_response :success
|
||||||
# Count subprojects issues
|
# Count subprojects issues
|
||||||
assert_select 'table.list tbody :nth-child(1):first' do
|
assert_select 'table.list tbody :nth-child(1):first' do
|
||||||
@ -55,10 +60,12 @@ class ReportsControllerTest < Redmine::ControllerTest
|
|||||||
|
|
||||||
def test_issue_report_without_subprojects_issues
|
def test_issue_report_without_subprojects_issues
|
||||||
Setting.stubs(:display_subprojects_issues?).returns(false)
|
Setting.stubs(:display_subprojects_issues?).returns(false)
|
||||||
get :issue_report, :params => {
|
get(
|
||||||
|
:issue_report,
|
||||||
|
:params => {
|
||||||
:id => 1
|
:id => 1
|
||||||
}
|
}
|
||||||
|
)
|
||||||
assert_response :success
|
assert_response :success
|
||||||
# Do not count subprojects issues
|
# Do not count subprojects issues
|
||||||
assert_select 'table.list tbody :nth-child(1):first' do
|
assert_select 'table.list tbody :nth-child(1):first' do
|
||||||
@ -71,10 +78,13 @@ class ReportsControllerTest < Redmine::ControllerTest
|
|||||||
|
|
||||||
def test_get_issue_report_details
|
def test_get_issue_report_details
|
||||||
%w(tracker version priority category assigned_to author subproject).each do |detail|
|
%w(tracker version priority category assigned_to author subproject).each do |detail|
|
||||||
get :issue_report_details, :params => {
|
get(
|
||||||
|
:issue_report_details,
|
||||||
|
:params => {
|
||||||
:id => 1,
|
:id => 1,
|
||||||
:detail => detail
|
:detail => detail
|
||||||
}
|
}
|
||||||
|
)
|
||||||
assert_response :success
|
assert_response :success
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -108,11 +118,13 @@ class ReportsControllerTest < Redmine::ControllerTest
|
|||||||
|
|
||||||
def test_get_issue_report_details_by_tracker_with_subprojects_issues
|
def test_get_issue_report_details_by_tracker_with_subprojects_issues
|
||||||
Setting.stubs(:display_subprojects_issues?).returns(true)
|
Setting.stubs(:display_subprojects_issues?).returns(true)
|
||||||
get :issue_report_details, :params => {
|
get(
|
||||||
|
:issue_report_details,
|
||||||
|
:params => {
|
||||||
:id => 1,
|
:id => 1,
|
||||||
:detail => 'tracker'
|
:detail => 'tracker'
|
||||||
}
|
}
|
||||||
|
)
|
||||||
assert_response :success
|
assert_response :success
|
||||||
# Count subprojects issues
|
# Count subprojects issues
|
||||||
assert_select 'table.list tbody :nth-child(1)' do
|
assert_select 'table.list tbody :nth-child(1)' do
|
||||||
@ -159,10 +171,13 @@ class ReportsControllerTest < Redmine::ControllerTest
|
|||||||
Issue.generate!(:tracker_id => 1, :status_id => 5)
|
Issue.generate!(:tracker_id => 1, :status_id => 5)
|
||||||
Issue.generate!(:tracker_id => 2)
|
Issue.generate!(:tracker_id => 2)
|
||||||
|
|
||||||
get :issue_report_details, :params => {
|
get(
|
||||||
|
:issue_report_details,
|
||||||
|
:params => {
|
||||||
:id => 1,
|
:id => 1,
|
||||||
:detail => 'tracker'
|
:detail => 'tracker'
|
||||||
}
|
}
|
||||||
|
)
|
||||||
assert_select 'table.list tbody :nth-child(1)' do
|
assert_select 'table.list tbody :nth-child(1)' do
|
||||||
assert_select 'td', :text => 'Bug'
|
assert_select 'td', :text => 'Bug'
|
||||||
assert_select ':nth-child(2)', :text => '2' # status:1
|
assert_select ':nth-child(2)', :text => '2' # status:1
|
||||||
@ -174,10 +189,13 @@ class ReportsControllerTest < Redmine::ControllerTest
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_get_issue_report_details_with_an_invalid_detail
|
def test_get_issue_report_details_with_an_invalid_detail
|
||||||
get :issue_report_details, :params => {
|
get(
|
||||||
|
:issue_report_details,
|
||||||
|
:params => {
|
||||||
:id => 1,
|
:id => 1,
|
||||||
:detail => 'invalid'
|
:detail => 'invalid'
|
||||||
}
|
}
|
||||||
|
)
|
||||||
assert_response 404
|
assert_response 404
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user