X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/3ec67ea2d395f9ae78f806f8e583e10d691861de..bd7c279604469e0ef22ed8148603befa469d9c2b:/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 e9aadcc3a..ba3d795de 100644 --- a/test/controllers/user_roles_controller_test.rb +++ b/test/controllers/user_roles_controller_test.rb @@ -31,8 +31,7 @@ class UserRolesControllerTest < ActionController::TestCase # Granting should still fail post :grant, :params => { :display_name => target_user.display_name, :role => "moderator" } - assert_redirected_to user_path(target_user) - assert_equal "Only administrators can perform user role management, and you are not an administrator.", flash[:error] + assert_redirected_to :controller => :errors, :action => :forbidden # Login as an administrator session[:user] = administrator_user.id @@ -92,8 +91,7 @@ class UserRolesControllerTest < ActionController::TestCase # Revoking should still fail post :revoke, :params => { :display_name => target_user.display_name, :role => "moderator" } - assert_redirected_to user_path(target_user) - assert_equal "Only administrators can perform user role management, and you are not an administrator.", flash[:error] + assert_redirected_to :controller => :errors, :action => :forbidden # Login as an administrator session[:user] = administrator_user.id