summaryrefslogtreecommitdiffstats
path: root/test/functional/roles_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-04-18 18:38:03 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-04-18 18:38:03 +0000
commit39ff11ba06a7c72eb27519b3e918969f43596573 (patch)
tree83f9e45b53d50c245b35e6dccd867f61e9e906c4 /test/functional/roles_controller_test.rb
parentdb64340419eceec5966ffc910daf38cf35506fd3 (diff)
downloadredmine-39ff11ba06a7c72eb27519b3e918969f43596573.tar.gz
redmine-39ff11ba06a7c72eb27519b3e918969f43596573.zip
Removes #move_to= (#12909).
git-svn-id: http://svn.redmine.org/redmine/trunk@15339 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/roles_controller_test.rb')
-rw-r--r--test/functional/roles_controller_test.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/functional/roles_controller_test.rb b/test/functional/roles_controller_test.rb
index d86943966..8ce469395 100644
--- a/test/functional/roles_controller_test.rb
+++ b/test/functional/roles_controller_test.rb
@@ -181,27 +181,27 @@ class RolesControllerTest < ActionController::TestCase
end
def test_move_highest
- put :update, :id => 3, :role => {:move_to => 'highest'}
+ put :update, :id => 3, :role => {:position => 1}
assert_redirected_to '/roles'
assert_equal 1, Role.find(3).position
end
def test_move_higher
position = Role.find(3).position
- put :update, :id => 3, :role => {:move_to => 'higher'}
+ put :update, :id => 3, :role => {:position => position - 1}
assert_redirected_to '/roles'
assert_equal position - 1, Role.find(3).position
end
def test_move_lower
position = Role.find(2).position
- put :update, :id => 2, :role => {:move_to => 'lower'}
+ put :update, :id => 2, :role => {:position => position + 1}
assert_redirected_to '/roles'
assert_equal position + 1, Role.find(2).position
end
def test_move_lowest
- put :update, :id => 2, :role => {:move_to => 'lowest'}
+ put :update, :id => 2, :role => {:position => Role.givable.count}
assert_redirected_to '/roles'
assert_equal Role.givable.count, Role.find(2).position
end