X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/3ec67ea2d395f9ae78f806f8e583e10d691861de..50d469a74a95a26645fc0f8dbe2ad71b0de24e29:/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 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