diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-07-30 16:32:08 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-07-30 16:32:08 +0000 |
commit | df59bff52f83e53d380b41483d0cfc8f7b23f959 (patch) | |
tree | a8fd7be6680a690f3978b1429501cab3f59f20eb | |
parent | d378343c236b493d472aac023413e65e5af0f44b (diff) | |
download | redmine-df59bff52f83e53d380b41483d0cfc8f7b23f959.tar.gz redmine-df59bff52f83e53d380b41483d0cfc8f7b23f959.zip |
Merged r16918 and r16919 (#26564).
git-svn-id: http://svn.redmine.org/redmine/branches/3.4-stable@16920 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/controllers/enumerations_controller.rb | 2 | ||||
-rw-r--r-- | test/functional/enumerations_controller_test.rb | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/app/controllers/enumerations_controller.rb b/app/controllers/enumerations_controller.rb index 985e988bc..e5e3cc3de 100644 --- a/app/controllers/enumerations_controller.rb +++ b/app/controllers/enumerations_controller.rb @@ -105,6 +105,6 @@ class EnumerationsController < ApplicationController def enumeration_params # can't require enumeration on #new action - params.permit(:enumeration => [:name, :active, :is_default])[:enumeration] + params.permit(:enumeration => [:name, :active, :is_default, :position])[:enumeration] end end diff --git a/test/functional/enumerations_controller_test.rb b/test/functional/enumerations_controller_test.rb index 6b157a4e8..1e0b75fb5 100644 --- a/test/functional/enumerations_controller_test.rb +++ b/test/functional/enumerations_controller_test.rb @@ -124,6 +124,18 @@ class EnumerationsControllerTest < Redmine::ControllerTest assert_select_error /name cannot be blank/i end + def test_update_position + assert_equal 2, Enumeration.find(2).position + put :update, :params => { + :id => 2, + :enumeration => { + :position => 1, + } + } + assert_response 302 + assert_equal 1, Enumeration.find(2).position + end + def test_destroy_enumeration_not_in_use assert_difference 'IssuePriority.count', -1 do delete :destroy, :params => { |