summaryrefslogtreecommitdiffstats
path: root/test/functional/project_enumerations_controller_test.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-11-24 05:43:56 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-11-24 05:43:56 +0000
commite3e5b5d1776aa66c97fec98d655f61e19598151e (patch)
treefa89af697ba2c8d4e315b3ee842be22a054b9890 /test/functional/project_enumerations_controller_test.rb
parentcdaa151efde62bdea139b4b59e474c837c453d4b (diff)
downloadredmine-e3e5b5d1776aa66c97fec98d655f61e19598151e.tar.gz
redmine-e3e5b5d1776aa66c97fec98d655f61e19598151e.zip
cleanup: rubocop: fix Layout/IndentFirstHashElement in test/functional/project_enumerations_controller_test.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@19237 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/project_enumerations_controller_test.rb')
-rw-r--r--test/functional/project_enumerations_controller_test.rb50
1 files changed, 32 insertions, 18 deletions
diff --git a/test/functional/project_enumerations_controller_test.rb b/test/functional/project_enumerations_controller_test.rb
index ead27661b..71b965096 100644
--- a/test/functional/project_enumerations_controller_test.rb
+++ b/test/functional/project_enumerations_controller_test.rb
@@ -42,7 +42,9 @@ class ProjectEnumerationsControllerTest < Redmine::ControllerTest
@request.session[:user_id] = 2 # manager
billable_field = TimeEntryActivityCustomField.find_by_name("Billable")
- put :update, :params => {
+ put(
+ :update,
+ :params => {
:project_id => 1,
:enumerations => {
"9"=> {"parent_id"=>"9", "custom_field_values"=> {"7" => "1"}, "active"=>"0"}, # Design, De-activate
@@ -51,7 +53,7 @@ class ProjectEnumerationsControllerTest < Redmine::ControllerTest
"11"=>{"parent_id"=>"11", "custom_field_values"=>{"7"=>"1"}, "active"=>"1"} # QA, no changes
}
}
-
+ )
assert_response :redirect
assert_redirected_to '/projects/ecookbook/settings/activities'
@@ -109,14 +111,22 @@ class ProjectEnumerationsControllerTest < Redmine::ControllerTest
})
assert project_activity_two.save
- put :update, :params => {
+ put(
+ :update,
+ :params => {
:project_id => 1,
:enumerations => {
- project_activity.id => {"custom_field_values"=> {"7" => "1"}, "active"=>"0"}, # De-activate
- project_activity_two.id => {"custom_field_values"=>{"7" => "1"}, "active"=>"0"} # De-activate
+ project_activity.id => {
+ "custom_field_values"=> {"7" => "1"},
+ "active"=>"0"
+ }, # De-activate
+ project_activity_two.id => {
+ "custom_field_values"=>{"7" => "1"},
+ "active"=>"0"
+ } # De-activate
}
}
-
+ )
assert_response :redirect
assert_redirected_to '/projects/ecookbook/settings/activities'
@@ -139,15 +149,21 @@ class ProjectEnumerationsControllerTest < Redmine::ControllerTest
assert_equal 3, TimeEntry.where(:activity_id => 9, :project_id => 1).count
@request.session[:user_id] = 2 # manager
- put :update, :params => {
+ put(
+ :update,
+ :params => {
:project_id => 1,
:enumerations => {
"9"=> {
- "parent_id"=>"9", "custom_field_values"=> {
- "7" => "1"}, "active"=>"0"} # Design, De-activate
-
- }
+ "parent_id"=>"9",
+ "custom_field_values"=> {
+ "7" => "1"
+ },
+ "active"=>"0"
+ } # Design, De-activate
+ }
}
+ )
assert_response :redirect
# No more TimeEntries using the system activity
@@ -174,7 +190,8 @@ class ProjectEnumerationsControllerTest < Redmine::ControllerTest
assert_equal 1, TimeEntry.where(:activity_id => 10, :project_id => 1).count
@request.session[:user_id] = 2 # manager
- put :update, :params => {
+ put(
+ :update, :params => {
:project_id => 1,
:enumerations => {
# Design
@@ -183,6 +200,7 @@ class ProjectEnumerationsControllerTest < Redmine::ControllerTest
"10"=> {"parent_id"=>"10", "custom_field_values"=>{"7"=>"0"}, "active"=>"1"}
}
}
+ )
assert_response :redirect
# TimeEntries shouldn't have been reassigned on the failed record
@@ -212,9 +230,7 @@ class ProjectEnumerationsControllerTest < Redmine::ControllerTest
})
assert project_activity_two.save
- delete :destroy, :params => {
- :project_id => 1
- }
+ delete(:destroy, :params => {:project_id => 1})
assert_response :redirect
assert_redirected_to '/projects/ecookbook/settings/activities'
@@ -235,9 +251,7 @@ class ProjectEnumerationsControllerTest < Redmine::ControllerTest
update_all("activity_id = '#{project_activity.id}'")
assert_equal 3, TimeEntry.where(:activity_id => project_activity.id,
:project_id => 1).count
- delete :destroy, :params => {
- :project_id => 1
- }
+ delete(:destroy, :params => {:project_id => 1})
assert_response :redirect
assert_redirected_to '/projects/ecookbook/settings/activities'