[openstreetmap/openstreetmap-website] Revoking administrator role on current user should fail (#1701)

Tom Hughes notifications at github.com
Tue Dec 19 15:56:43 UTC 2017

tomhughes commented on this pull request.

> @@ -134,5 +134,9 @@ def test_revoke
     assert_redirected_to user_path(target_user.display_name)
     assert_equal "The string `no_such_role' is not a valid role.", flash[:error]
+    # Revoking administrator role from current user should fail
+    post :revoke, :params => { :display_name => administrator_user.display_name, :role => "administrator" }
+    assert_redirected_to user_path(administrator_user.display_name)

If a test with a different seed value is ok it means there is some dependency between tests so that they only work when run in a certain order.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20171219/89858651/attachment.html>

More information about the rails-dev mailing list