diff options
Diffstat (limited to 'test/functional/roles_controller_test.rb')
-rw-r--r-- | test/functional/roles_controller_test.rb | 8 |
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 |