X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/eab2eeaa47b2aa8c7f52371f9bfdd60711a41fb6..ef7f3d800cbdd49b692df10d312e5fd880e2e938:/test/controllers/user_roles_controller_test.rb diff --git a/test/controllers/user_roles_controller_test.rb b/test/controllers/user_roles_controller_test.rb index 1d005824d..81a8ac1a4 100644 --- a/test/controllers/user_roles_controller_test.rb +++ b/test/controllers/user_roles_controller_test.rb @@ -35,7 +35,6 @@ class UserRolesControllerTest < ActionController::TestCase session[:user] = users(:administrator_user).id UserRole::ALL_ROLES.each do |role| - # Granting a role to a non-existent user should fail assert_difference "UserRole.count", 0 do post :grant, :display_name => "non_existent_user", :role => role @@ -63,7 +62,6 @@ class UserRolesControllerTest < ActionController::TestCase end assert_redirected_to user_path(users(:normal_user).display_name) assert_equal "The user already has role #{role}.", flash[:error] - end # Granting a non-existent role should fail @@ -93,7 +91,6 @@ class UserRolesControllerTest < ActionController::TestCase session[:user] = users(:administrator_user).id UserRole::ALL_ROLES.each do |role| - # Removing a role from a non-existent user should fail assert_difference "UserRole.count", 0 do post :revoke, :display_name => "non_existent_user", :role => role @@ -121,7 +118,6 @@ class UserRolesControllerTest < ActionController::TestCase end assert_redirected_to user_path(users(:super_user).display_name) assert_equal "The user does not have role #{role}.", flash[:error] - end # Revoking a non-existent role should fail