X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/98184dfb9cacc74ac5bcb91a41a2d5804b3f4f7d..e07d2255683fc60295eff5a5b7f11a33a017e06e:/test/controllers/user_roles_controller_test.rb?ds=inline 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