From 514f038f44d2bab1c49e6e374c65fbd6a0517e18 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Fri, 28 Apr 2017 10:11:26 -0400 Subject: Fix error not appearing when updating to existing username (#6255) --- api4/user_test.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'api4') 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) -- cgit v1.2.3-1-g7c22