diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-11-01 12:05:48 -0400 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2016-11-01 09:05:48 -0700 |
commit | aa6cb03b2042ff0f11e7c418ad2535eccc29d218 (patch) | |
tree | 43cf15ffe933790fb6c53f6cdabf8ddac2cad7c8 /api | |
parent | 92642bab6852d02e6b58f881ac909788299d0c5c (diff) | |
download | chat-aa6cb03b2042ff0f11e7c418ad2535eccc29d218.tar.gz chat-aa6cb03b2042ff0f11e7c418ad2535eccc29d218.tar.bz2 chat-aa6cb03b2042ff0f11e7c418ad2535eccc29d218.zip |
Prevent system_admin role mistake (#4405)
Diffstat (limited to 'api')
-rw-r--r-- | api/user_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/api/user_test.go b/api/user_test.go index 20c555931..2c6238c54 100644 --- a/api/user_test.go +++ b/api/user_test.go @@ -986,6 +986,10 @@ func TestUserUpdateRoles(t *testing.T) { t.Fatal("Should have errored, bad id") } + if _, err := Client.UpdateUserRoles("system_admin", ""); err == nil { + t.Fatal("Should have errored, we want to avoid this mistake") + } + if _, err := Client.UpdateUserRoles("12345678901234567890123456", ""); err == nil { t.Fatal("Should have errored, bad id") } |