summaryrefslogtreecommitdiffstats
path: root/api4/user_test.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-04-28 10:11:26 -0400
committerChristopher Speller <crspeller@gmail.com>2017-04-28 10:11:26 -0400
commit514f038f44d2bab1c49e6e374c65fbd6a0517e18 (patch)
tree0a350af53c7a25ae113dae04a9d14ac1178d05aa /api4/user_test.go
parent1b82d98cdbb4e02d7de36c842efd858daaa69406 (diff)
downloadchat-514f038f44d2bab1c49e6e374c65fbd6a0517e18.tar.gz
chat-514f038f44d2bab1c49e6e374c65fbd6a0517e18.tar.bz2
chat-514f038f44d2bab1c49e6e374c65fbd6a0517e18.zip
Fix error not appearing when updating to existing username (#6255)
Diffstat (limited to 'api4/user_test.go')
-rw-r--r--api4/user_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/api4/user_test.go b/api4/user_test.go
index ae0dd79e5..82949f913 100644
--- a/api4/user_test.go
+++ b/api4/user_test.go
@@ -797,6 +797,13 @@ func TestPatchUser(t *testing.T) {
t.Fatal("NotifyProps did not update properly")
}
+ patch.Username = new(string)
+ *patch.Username = th.BasicUser2.Username
+ _, resp = Client.PatchUser(user.Id, patch)
+ CheckBadRequestStatus(t, resp)
+
+ patch.Username = nil
+
_, resp = Client.PatchUser("junk", patch)
CheckBadRequestStatus(t, resp)