summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/functional/reports_controller_test.rb38
1 files changed, 28 insertions, 10 deletions
diff --git a/test/functional/reports_controller_test.rb b/test/functional/reports_controller_test.rb
index a016700a5..cb821f6d2 100644
--- a/test/functional/reports_controller_test.rb
+++ b/test/functional/reports_controller_test.rb
@@ -31,18 +31,23 @@ class ReportsControllerTest < Redmine::ControllerTest
:workflows
def test_get_issue_report
- get :issue_report, :params => {
+ get(
+ :issue_report,
+ :params => {
:id => 1
}
+ )
assert_response :success
end
def test_issue_report_with_subprojects_issues
Setting.stubs(:display_subprojects_issues?).returns(true)
- get :issue_report, :params => {
+ get(
+ :issue_report,
+ :params => {
:id => 1
}
-
+ )
assert_response :success
# Count subprojects issues
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
Setting.stubs(:display_subprojects_issues?).returns(false)
- get :issue_report, :params => {
+ get(
+ :issue_report,
+ :params => {
:id => 1
}
-
+ )
assert_response :success
# Do not count subprojects issues
assert_select 'table.list tbody :nth-child(1):first' do
@@ -71,10 +78,13 @@ class ReportsControllerTest < Redmine::ControllerTest
def test_get_issue_report_details
%w(tracker version priority category assigned_to author subproject).each do |detail|
- get :issue_report_details, :params => {
+ get(
+ :issue_report_details,
+ :params => {
:id => 1,
:detail => detail
}
+ )
assert_response :success
end
end
@@ -108,11 +118,13 @@ class ReportsControllerTest < Redmine::ControllerTest
def test_get_issue_report_details_by_tracker_with_subprojects_issues
Setting.stubs(:display_subprojects_issues?).returns(true)
- get :issue_report_details, :params => {
+ get(
+ :issue_report_details,
+ :params => {
:id => 1,
:detail => 'tracker'
}
-
+ )
assert_response :success
# Count subprojects issues
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 => 2)
- get :issue_report_details, :params => {
+ get(
+ :issue_report_details,
+ :params => {
:id => 1,
:detail => 'tracker'
}
+ )
assert_select 'table.list tbody :nth-child(1)' do
assert_select 'td', :text => 'Bug'
assert_select ':nth-child(2)', :text => '2' # status:1
@@ -174,10 +189,13 @@ class ReportsControllerTest < Redmine::ControllerTest
end
def test_get_issue_report_details_with_an_invalid_detail
- get :issue_report_details, :params => {
+ get(
+ :issue_report_details,
+ :params => {
:id => 1,
:detail => 'invalid'
}
+ )
assert_response 404
end
end