summaryrefslogtreecommitdiffstats
path: root/test/functional/reports_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-05-31 17:32:34 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-05-31 17:32:34 +0000
commitb834e81d7f41121fc6d9bef95ee090f8f466493e (patch)
tree61fddb6214c64e96fddd504301029bdb382ba439 /test/functional/reports_controller_test.rb
parent1d4300b674f739d671a8be22d3ea617922f16517 (diff)
downloadredmine-b834e81d7f41121fc6d9bef95ee090f8f466493e.tar.gz
redmine-b834e81d7f41121fc6d9bef95ee090f8f466493e.zip
Use Rails 5 syntax for functional tests.
git-svn-id: http://svn.redmine.org/redmine/trunk@16585 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/reports_controller_test.rb')
-rw-r--r--test/functional/reports_controller_test.rb19
1 files changed, 15 insertions, 4 deletions
diff --git a/test/functional/reports_controller_test.rb b/test/functional/reports_controller_test.rb
index 4d999d881..2b8ed911a 100644
--- a/test/functional/reports_controller_test.rb
+++ b/test/functional/reports_controller_test.rb
@@ -28,13 +28,18 @@ class ReportsControllerTest < Redmine::ControllerTest
:versions
def test_get_issue_report
- get :issue_report, :id => 1
+ get :issue_report, :params => {
+ :id => 1
+ }
assert_response :success
end
def test_get_issue_report_details
%w(tracker version priority category assigned_to author subproject).each do |detail|
- get :issue_report_details, :id => 1, :detail => detail
+ get :issue_report_details, :params => {
+ :id => 1,
+ :detail => detail
+ }
assert_response :success
end
end
@@ -46,7 +51,10 @@ class ReportsControllerTest < Redmine::ControllerTest
Issue.generate!(:tracker_id => 1, :status_id => 5)
Issue.generate!(:tracker_id => 2)
- get :issue_report_details, :id => 1, :detail => 'tracker'
+ 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
@@ -58,7 +66,10 @@ class ReportsControllerTest < Redmine::ControllerTest
end
def test_get_issue_report_details_with_an_invalid_detail
- get :issue_report_details, :id => 1, :detail => 'invalid'
+ get :issue_report_details, :params => {
+ :id => 1,
+ :detail => 'invalid'
+ }
assert_response 404
end
end