X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/eab2eeaa47b2aa8c7f52371f9bfdd60711a41fb6..965f32d545d7c44ad7b36264b818b930a50d8901:/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..61cf78b88 100644 --- a/test/controllers/user_roles_controller_test.rb +++ b/test/controllers/user_roles_controller_test.rb @@ -1,4 +1,4 @@ -require 'test_helper' +require "test_helper" class UserRolesControllerTest < ActionController::TestCase fixtures :users, :user_roles @@ -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