X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/25f27a753f6a79bc1ae494e42cf03b9880d0bdcd..03ca0b2c697052c80b25f2111ab6ab718478a95a:/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