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

Tom Hughes notifications at github.com
Tue Dec 19 17:34:08 UTC 2017


tomhughes commented on this pull request.



> @@ -134,5 +134,9 @@ def test_revoke
     end
     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)

Actually the problem is that test tries to fetch an arbitrary node ID expecting it not to exist so fails if a previous test happens to have created it.

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


More information about the rails-dev mailing list